staskh/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.
npx skills add https://github.com/staskh/trading_skills --skill 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.
uv run python scripts/consolidate.py <directory> [--port PORT] [--output-dir OUTPUT_DIR]
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 the IB_PORT env var when set (--port still overrides).--output-dir - Output directory for reports (default: sandbox/)Groups trades by:
Aggregates:
Adds column:
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# 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"
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.
Take staskh/ib-create-consolidated-report from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.