IB Consolidated Report
Consolidate IBRK trade CSV files into summary reports organized by symbol and date.
Installation
- Make sure Claude is on your device and in your terminal.
Skills load from
~/.claude/skills/when Claude Code starts up — so you need it on your machine first. If you don't have it yet, install it once with the command below, then runclaudein any terminal to verify.One-time setupnpm i -g @anthropic-ai/claude-codeAlready have it? Skip ahead.
- Paste into Claude Code or into your terminal.
This copies the whole skill folder into
~/.claude/skills/ib-create-consolidated-report-staskh/— the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Safe default: works for every skill.Faster alternative (instruction-only skills)
Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates — they won't be downloaded and the skill will fail when it tries to load them.
Quick install (SKILL.md only)Sign up to copy - Restart Claude Code.
Quit and reopen Claude Code (or any other agent that loads from
~/.claude/skills/). New skills are picked up on startup. - Just ask Claude.
Skills auto-activate when your request matches the skill's description — no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the “What this skill does” section above.
Prefer to read the source first? Open on GitHub.
When Claude uses it
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.
What this skill does
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).--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.
Related skills
Spreadsheet & Excel Editor
anthropics
Open, edit, and create Excel and CSV files with formulas, formatting, and data cleaning.
n8n Architect
EtienneLescot
Create, edit, and validate n8n workflows and automation configurations.
Business Growth Toolkit
alirezarezvani
Manage customer health, predict churn, handle RFPs, and streamline sales operations.
Revenue Pipeline Analyzer
alirezarezvani
Analyze sales pipeline health, forecast accuracy, and go-to-market efficiency for SaaS teams.