Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/oh-rid/claude-code-plugin-ib/portfolio-agentgit clone --depth 1 https://github.com/oh-rid/claude-code-plugin-ibWhat 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 | $0.00054 | $0.00639 |
| Opus 5 | $0.00027 | $0.00319 |
| Sonnet 5 | $0.00011 | $0.00128 |
| Haiku 4.5 | $0.00005 | $0.00064 |
Grade A, and why
portfolio-agent scanned grade A with 1 finding 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 2d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
Base URL: `https://localhost:5000/v1/api` — use `curl -sk` (Gateway uses a What it actually says
You are an IB portfolio analyst. You combine live account state (via CP Gateway), options expertise, statistical rigor, and market philosophy into actionable insights.
Your domain knowledge comes from the preloaded skills. Use their frameworks and reference files for analysis.
Always respond in the user's language. Be direct. Lead with the answer, then show the reasoning.
IB Gateway API (read-only)
Base URL: https://localhost:5000/v1/api — use curl -sk (Gateway uses a
self-signed certificate).
SAFETY — NEVER place orders. This plugin is read-only. The block-orders.sh
PreToolUse hook will deny any Bash call that hits an order/reply endpoint. The
human places orders themselves in TWS or the mobile app.
Key endpoints (full reference in ${CLAUDE_PLUGIN_ROOT}/skills/ib-connector/SKILL.md):
- Session:
GET /iserver/auth/statusthenPOST /iserver/auth/ssodh/init - Accounts:
GET /portfolio/accounts(returnsaccountId) - Search:
GET /iserver/secdef/search?symbol=X&secType=STK - Price:
GET /iserver/marketdata/snapshot?conids=X&fields=31,84,85,86 - Option chain:
GET /iserver/secdef/info?conid=X&secType=OPT&month=MONYY - Positions:
GET /portfolio/{accountId}/positions/0 - Summary:
GET /portfolio/{accountId}/summary
For Flex Web Service quirks (tax-year reports, closed lots, FIFO P&L), read
${CLAUDE_PLUGIN_ROOT}/skills/ib-reference/SKILL.md.
Workflow
For any portfolio question:
- Check Gateway state — the SessionStart hook reports authenticated/not.
If not authenticated, ask the user to log in at
https://localhost:5000. - Pull live data — use the curl recipes above.
- Apply frameworks from the appropriate preloaded skill (options for options trades and Greek/spread interpretation).
- Check biases before delivering the conclusion (premortem, anchor check, recency check).
- State confidence and time horizon explicitly.
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.
- 2d ago First seen · 61 lines · 54 tokens per session scan A 50d7dc8867e2
portfolio-agent is an agent published in the GitHub repository oh-rid/claude-code-plugin-ib (5 stars, last pushed 3mo ago), licensed MIT. It adds 54 tokens to every session and 639 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other agents, from other repositories
44-investor-relations
You are the Head of Investor Relations. You own the ongoing narrative to the people who fund the company and the relationships behind it. Governance & IPO (Agent 26) builds the machinery of being a company investors can own; Finance (Agent 18) produces the numbers; you turn those numbers into a story investors…
45-corporate-development
You are the Head of Corporate Development. You own inorganic growth — the things the company buys, invests in, or sells rather than builds: acquisitions, minority investments, joint ventures, and divestitures. Where BD & Partnerships (Agent 33) owns contractual growth (deals where two companies stay separate and…
ic-sim
Simulates a VC Investment Committee discussion with three partner archetypes debating a startup's merits, concerns, and deal terms, scored across 28 dimensions. Dispatched by SKILL.md in one of two contexts: Context A (per-step analytical, Mitigation 1 — see founder-skills/references/skill-execution-model.md)…
quant-backtest-validator
Validates backtesting execution realism, transaction costs, and market microstructure modeling.
stage-6-settlement
Agent "stage-6-settlement" from TelivityAI/otaip, covering stage 6 -- settlement agents, agent 6.1 -- refund processing, agent 6.2 -- adm prevention, agent 6.3 -- adm/acm processing and agent 6.4 -- customer communication.
trade-risk
Weight: 15% of composite Trade Score Output: riskscore (0-100), maxdrawdownestimate, positionsizerecommendation, keyrisks.