Skip to content
alyn
staskh

Ib Portfolio Action Report skill

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.

$npx skills add staskh/trading_skills --skill ib-portfolio-action-report
View this skill on GitHubstaskh/trading_skills/.claude/skills/ib-portfolio-action-report/SKILL.md
Pack stars
407
Pack installs
3.1k
Alyn Score
56/99
Updated
2 days ago
License
MIT
– views – installs via Alyn

Install Ib Portfolio Action Report

Pick your agent. Every command is ready to paste.

$npx skills add staskh/trading_skills --skill ib-portfolio-action-report

The open skills CLI detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.

01

Install it

Run the command above, or upload the folder in Claude.

02

Ask naturally

Describe the task. Your agent loads ib-portfolio-action-report when the request matches its description.

03

Name it if needed

If it does not trigger, say “use the ib-portfolio-action-report skill”. In Codex, type $ib-portfolio-action-report.

The skill itself

SKILL.md

FolderGitHub

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_PORT env var — default port when --port is omitted (e.g. IB_PORT=4001 for a Gateway container). Precedence: --port flag > IB_PORT > built-in default. Set it in the shell or a .env file.

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 uv is not installed or pyproject.toml is not found, replace uv run python with python in 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 IDs
  • summary - Red/yellow/green counts
  • spreads - All positions grouped into spreads with risk level, urgency, and recommendations
  • technicals - Technical indicators per symbol (RSI, trend, SMAs, MACD, ADX)
  • earnings - Earnings dates per symbol
  • prices - Current prices per symbol
  • earnings_calendar - Upcoming earnings with account/position info
  • account_summary - Position and risk counts per account

Report Sections

  1. Critical Summary: Count of positions by risk level (🔴/🟡/🟢)
  2. Immediate Action Required: Positions expiring within 2 days
  3. Urgent - Expiring Within 1 Week: Short-term positions needing attention
  4. Critical Earnings Alert: Positions with earnings this week
  5. Earnings Next Week: Upcoming earnings exposure
  6. Expiring in 2 Weeks: Medium-term expirations
  7. Longer-Dated Positions: Core holdings with spread analysis
  8. Top Priority Actions: Numbered action items by urgency
  9. Position Size Summary: Account-level breakdown
  10. Earnings Calendar: Next 30 days of earnings dates
  11. 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-async
  • pandas-ta
  • yfinance

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.

Tips for Ib Portfolio Action Report

  • • Start a fresh session after installing so your agent picks up the new skill.
  • • This skill ships scripts. Read them before the first run, and run it in a project without secrets first.
  • • It bundles reference files. The agent reads them only when needed, so they cost no context until then.
  • • It is part of a pack with 30 skills. Install only the ones you need with --skill to keep triggers precise.
  • • If two skills overlap, mention the one you want by name.

Questions about Ib Portfolio Action Report

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 staskh/trading_skills --skill ib-portfolio-action-report" in your project. The skills CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.

Does Ib Portfolio Action Report work in Cursor and Codex?

Yes. Ib Portfolio Action Report uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.

Is Ib Portfolio Action Report free?

Ib Portfolio Action Report is open source on GitHub under the MIT license. It is free to install; check the license before commercial use.

Who made Ib Portfolio Action Report?

Ib Portfolio Action Report is published by staskh in the staskh/trading_skills repository, together with 29 other skills.

Similar skills. From other creators.