Borrowing it
Nothing to install: this file belongs to patrickpxp/ibkr-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/patrickpxp/ibkr-mcp-server/main/.codex/skills/ibkr-portfolio/SKILL.mdgit clone --depth 1 https://github.com/patrickpxp/ibkr-mcp-serverWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/patrickpxp/ibkr-mcp-server/ibkr-portfolio)<a href="https://agentmods.dev/skills/patrickpxp/ibkr-mcp-server/ibkr-portfolio"><img src="https://agentmods.dev/badge/skills/patrickpxp/ibkr-mcp-server/ibkr-portfolio/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/patrickpxp/ibkr-mcp-server/ibkr-portfolio"><img src="https://agentmods.dev/badge/skills/patrickpxp/ibkr-mcp-server/ibkr-portfolio.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00028 | $0.00735 |
| Opus 5 | $0.00014 | $0.00367 |
| Sonnet 5 | $0.00006 | $0.00147 |
| Haiku 4.5 | $0.00003 | $0.00073 |
Grade A, and why
ibkr-portfolio scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Use this skill when the user wants their current IBKR portfolio, P&L, or historical trade activity.
Instructions:
- For current positions/current portfolio P&L, call the MCP tool
ibkr_get_portfolio; do not fabricate or estimate positions. - For current-position P&L workflows, call
ibkr_get_portfoliowithinclude_pnl=true(or omit it, since default istrue). Only setinclude_pnl=falsewhen the user explicitly asks for positions-only output. - Use input parameters only when explicitly requested:
accountto override the default account.include_pnlto omit or include P&L (trueby default).as_ofto echo the caller-provided timestamp.
- Current P&L behavior:
- Position-level
unrealizedPnlandrealizedPnluse IBKR portfolio rows when available (ib.portfolio(...)data). - If market data price is missing,
marketPrice/marketValuecan still be populated from portfolio rows. - If both market data and portfolio row values are unavailable for a position, related P&L fields may remain
null; report this via returnednotes. Historical trades:
- Position-level
- For “what did I trade?”, yesterday’s trades, YTD trade lists, or trade-count questions, call
ibkr_get_trade_confirmationsfirst. - Do not conclude “no trades” from
ibkr_get_transactionsoribkr_get_executionsalone; those can be session-limited/empty while the Flex statement has trades. - If
TradeConfirmrows are unavailable but the tool notes a fallback to FlexTraderows, use those rows. - Parse returned
dateTimeasDD/MM/YYYY;HH:MM:SS TZfirst. Example:28/04/2026;13:43:25 EDTis 2026-04-28. Also tolerate ISO dates if present. - When filtering by a calendar date, compare parsed dates, not string fragments like
04/28/2026. - For trade rows, present columns: dateTime, symbol, description, side, quantity, price, proceeds, commission, currency, tradeId, orderId.
- Make clear that proceeds/commissions are cash flow; exact realized profit needs realized P&L / cost-basis data.
Portfolio presentation:
- Present results in this order:
- A table of positions with columns: symbol, secType, exchange, currency, position, avgCost, marketPrice, marketValue, unrealizedPnl, realizedPnl.
- Totals summary: unrealizedPnl, realizedPnl, netLiquidation.
- Notes list (bullet points).
- If the tool returns an error object:
- Explain the error clearly.
- Provide troubleshooting steps:
- Confirm TWS/IB Gateway is running.
- Verify API access is enabled in TWS.
- Check
IBKR_HOST/IBKR_PORTvalues. - On Linux, ensure Docker uses
extra_hosts: host.docker.internal:host-gateway. - Check firewall or local permissions.
- Safety: read-only. Do not place orders or perform any trading action.
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 44 lines · 28 tokens per session scan A 12720e3fe35d
ibkr-portfolio is a skill published in the GitHub repository patrickpxp/ibkr-mcp-server (9 stars, last pushed 4mo ago), licensed MIT. It adds 28 tokens to every session and 735 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
sector-rotation
An analysis framework for comparing industries in the Chinese A-share stock market, using business conditions, price momentum, valuation, and money flows. It produces rankings and higher- or lower-allocation suggestions.
strategy-pivot-designer
Detect backtest iteration stagnation and generate structurally different strategy pivot proposals when parameter tuning reaches a local optimum.
twitter-reader
Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my…
chenhao-limit-up
A framework for judging Chinese A-share stocks that have reached the daily price-rise limit, using market mood, sector leadership, and trading momentum.
trading-risk-gate
Unified pre-trade safety gate: Ruin check (Law #1), ergodicity audit, and win-rate dominance validation. Absorbs: ergodicity-check, law-of-ruin, win-rate-dominance.
vectorbt
High-performance vectorized backtesting with parameter optimization, portfolio simulation, and rich performance metrics.