
ib-portfolio-action-report
Generate a comprehensive portfolio action report with earnings dates and risk assessment. Use when user asks for portfolio review, action items, earnings risk, or position management across IB accounts. Requires TWS or IB Gateway running locally.
- Installs
- 77
- 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-portfolio-action-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-portfolio-action-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 Portfolio Action Report
Generate a comprehensive portfolio action report that analyzes all positions across Interactive Brokers accounts, fetches earnings dates, and provides traffic-light risk indicators (🔴🟡🟢) for each position.
IB Connection
TWS or IB Gateway must be running locally with API enabled:
- Paper trading — port 7497
- Live trading — port 7496
IB_PORTenv var — default port when--portis omitted (e.g.IB_PORT=4001for a Gateway container). Precedence:--portflag >IB_PORT> built-in default. Set it in the shell or a.envfile.
Port fallback: If the configured port fails, automatically retry on the other port. If the retry succeeds, save to memory which account type worked (live/paper) and reuse it for all IB skill calls in this and future sessions — until the user explicitly asks for the other account. If both ports fail, ask the user to verify that TWS or IB Gateway is running with API access enabled.
Instructions
Step 1: Gather Data
Note: If
uvis not installed orpyproject.tomlis not found, replaceuv run pythonwithpythonin all commands below.
uv run python scripts/report.py [--port PORT] [--account ACCOUNT]
The script returns JSON to stdout with analyzed portfolio data including risk levels, earnings dates, technical indicators, and spread groupings.
Step 2: Format Report
Read templates/markdown-template.md for formatting instructions. Generate a markdown report from the JSON data and save to sandbox/.
Filename: ib_portfolio_action_report_{ACCOUNT}_{YYYY-MM-DD}_{HHmm}.md
Step 3: Report Results
Present critical findings to the user: red/yellow items requiring attention, top priority actions, and the saved report path.
Arguments
--port- IB port (default: 7497 for paper trading)--account- Specific account ID to analyze (optional, defaults to all accounts)
JSON Output
The script returns structured JSON with:
generated_at- NY timestamp (e.g."2026-04-29 19:35 ET")data_delay- Data freshness ("real-time")accounts- List of account IDssummary- Red/yellow/green countsspreads- All positions grouped into spreads with risk level, urgency, and recommendationstechnicals- Technical indicators per symbol (RSI, trend, SMAs, MACD, ADX)earnings- Earnings dates per symbolprices- Current prices per symbolearnings_calendar- Upcoming earnings with account/position infoaccount_summary- Position and risk counts per account
Report Sections
- Critical Summary: Count of positions by risk level (🔴/🟡/🟢)
- Immediate Action Required: Positions expiring within 2 days
- Urgent - Expiring Within 1 Week: Short-term positions needing attention
- Critical Earnings Alert: Positions with earnings this week
- Earnings Next Week: Upcoming earnings exposure
- Expiring in 2 Weeks: Medium-term expirations
- Longer-Dated Positions: Core holdings with spread analysis
- Top Priority Actions: Numbered action items by urgency
- Position Size Summary: Account-level breakdown
- Earnings Calendar: Next 30 days of earnings dates
- Technical Analysis Summary: RSI, trend, SMAs, MACD, ADX for each underlying
Example Usage
# All accounts (paper, default)
uv run python scripts/report.py
# Live account
uv run python scripts/report.py --port 7496
# Specific account
uv run python scripts/report.py --account U790497
Dependencies
ib-asyncpandas-tayfinance
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-portfolio-action-report skill do?
Generate a comprehensive portfolio action report with earnings dates and risk assessment. Use when user asks for portfolio review, action items, earnings risk, or position management across IB accounts. Requires TWS or IB Gateway running locally.
How do I install ib-portfolio-action-report?
Run npx skills add https://github.com/staskh/trading_skills --skill ib-portfolio-action-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-portfolio-action-report/ (personal) or .claude/skills/ib-portfolio-action-report/ (project).
Which AI agents can use ib-portfolio-action-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-portfolio-action-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-portfolio-action-report?
It is published by staskh in staskh/trading_skills. It has 77 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
Get recent news and sentiment for a stock. Use when user asks about news, headlines, sentiment, what's happening with a stock, or recent developments.
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.