
ib-create-consolidated-report
Consolidate IBRK trade CSV files from a directory into a summary report. Groups trades by symbol, underlying, date, strike, buy/sell, and open/close. Outputs both markdown and CSV.
- Installs
- 76
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/staskh/trading_skills --skill ib-create-consolidated-report- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads ib-create-consolidated-report automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
IB Create Consolidated Report
Reads all CSV files from a given directory (excluding subdirectories), consolidates trade data by key fields, and generates both markdown and CSV reports.
Instructions
uv run python scripts/consolidate.py <directory> [--port PORT] [--output-dir OUTPUT_DIR]
Arguments
directory- Path to directory containing IBRK trade CSV files--port- IB port to fetch unrealized P&L (7497=paper, 7496=live). If not specified, auto-probes both ports (tries 7496 first, then 7497). Defaults to theIB_PORTenv var when set (--portstill overrides).--output-dir- Output directory for reports (default: sandbox/)
Consolidation Logic
Groups trades by:
- UnderlyingSymbol - The underlying ticker (e.g., GOOG, CAT)
- Symbol - Full option symbol
- TradeDate - Date of the trade
- Strike - Strike price
- Put/Call - Option type (C or P)
- Buy/Sell - Trade direction
- Open/CloseIndicator - Whether opening or closing
Aggregates:
- Quantity - Sum of quantities
- Proceeds - Sum of proceeds
- NetCash - Sum of net cash
- IBCommission - Sum of commissions
- FifoPnlRealized - Sum of realized P&L
Adds column:
- Position - SHORT (Sell+Open), LONG (Buy+Open), CLOSE_SHORT (Buy+Close), CLOSE_LONG (Sell+Close)
Output
Generates two files in the output directory:
consolidated_trades_YYYY-MM-DD_HHMM.md- Markdown report with summary tablesconsolidated_trades_YYYY-MM-DD_HHMM.csv- CSV with all consolidated data
Example Usage
# Consolidate trades from IBRK reports directory
uv run python scripts/consolidate.py "C:\Users\avrah\OneDrive\Business\Trading\IBRK reports\2stastrading2025"
# Specify custom output directory
uv run python scripts/consolidate.py "C:\path\to\reports" --output-dir "C:\output"
Timezone
All timestamps and time-based calculations must use the America/New_York timezone. All JSON output must include generated_at (NY time string) and data_delay fields.
FAQ
What does the ib-create-consolidated-report skill do?
Consolidate IBRK trade CSV files from a directory into a summary report. Groups trades by symbol, underlying, date, strike, buy/sell, and open/close. Outputs both markdown and CSV.
How do I install ib-create-consolidated-report?
Run npx skills add https://github.com/staskh/trading_skills --skill ib-create-consolidated-report in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/ib-create-consolidated-report/ (personal) or .claude/skills/ib-create-consolidated-report/ (project).
Which AI agents can use ib-create-consolidated-report?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is ib-create-consolidated-report safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains ib-create-consolidated-report?
It is published by staskh in staskh/trading_skills. It has 76 recorded installs.
More from staskh/trading_skills
technical-analysis
staskh/trading_skills
Compute technical indicators like RSI, MACD, Bollinger Bands, SMA, EMA for a stock. Use when user asks about technical analysis, indicators, RSI, MACD, moving averages, overbought/oversold, or chart analysis.
news-sentiment
staskh/trading_skills
Open the skill to read its SKILL.md instructions.
fundamentals
staskh/trading_skills
Open the skill to read its SKILL.md instructions.
stock-quote
staskh/trading_skills
Open the skill to read its SKILL.md instructions.
greeks
staskh/trading_skills
Open the skill to read its SKILL.md instructions.
report-stock
staskh/trading_skills
Open the skill to read its SKILL.md instructions.
Popular docs & writing skills
grill-with-docs
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
lark-markdown
open.feishu.cn
飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。
writing-beats
mattpocock/skills
Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.
writing-shape
mattpocock/skills
Writing, exploit: shape raw material into an article, paragraph by paragraph.
writing-fragments
mattpocock/skills
Writing, explore: mine raw fragments, no structure yet.
writing-for-agents
mattpocock/skills
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.