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 skills/oh-rid/claude-code-plugin-ib/portfolio-reportnpx skills add oh-rid/claude-code-plugin-ib --skill portfolio-reportgit clone --depth 1 https://github.com/oh-rid/claude-code-plugin-ibWrote 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/oh-rid/claude-code-plugin-ib/portfolio-report)<a href="https://agentmods.dev/skills/oh-rid/claude-code-plugin-ib/portfolio-report"><img src="https://agentmods.dev/badge/skills/oh-rid/claude-code-plugin-ib/portfolio-report.svg" alt="Measured on agentmods" 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.00067 | $0.01214 |
| Opus 5 | $0.00034 | $0.00607 |
| Sonnet 5 | $0.00013 | $0.00243 |
| Haiku 4.5 | $0.00007 | $0.00121 |
Grade A, and why
portfolio-report 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 5d 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.
curl -sk https://localhost:5000/v1/api/tickle How it starts
The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Portfolio Report — Solo Trader
Pull live IB account data and produce a one-page portfolio snapshot. Not a 10-page client report. A trader's dashboard in markdown.
Workflow
Step 0: Session check
curl -sk https://localhost:5000/v1/api/tickle
Step 1: Get account ID
curl -sk https://localhost:5000/v1/api/portfolio/accounts
Step 2: Account summary
curl -sk "https://localhost:5000/v1/api/portfolio/$ACCT/summary"
Extract:
- NLV (Net Liquidation Value)
- Buying power (available margin or cash)
- Gross position value
- Maintenance margin (if on margin)
- Cushion (excess liquidity / NLV — how far from margin call)
Step 3: Pull all positions
curl -sk "https://localhost:5000/v1/api/portfolio/$ACCT/positions/0"
For each position: ticker, assetClass, position (qty), mktValue,
avgCost, avgPrice, unrealizedPnl, realizedPnl, currency.
Step 4: Currency breakdown
curl -sk "https://localhost:5000/v1/api/portfolio/$ACCT/ledger"
Shows cash balances per currency and settled/unsettled.
Step 5: Calculate derived metrics
All via python3 -c:
- Total unrealized P&L = sum of all unrealizedPnl
- Total realized P&L = sum of all realizedPnl
- Concentration = largest position mktValue / NLV (flag if > 25%)
- Position count = number of open positions
- Long/short split = sum of long mktValue vs short mktValue
- Asset class breakdown = aggregate mktValue by assetClass (STK, OPT, FUT, CASH, BOND)
Step 6: Identify notable positions
Flag:
- Biggest winner: position with highest unrealizedPnl
- Biggest loser: position with most negative unrealizedPnl
- Most concentrated: position with highest % of NLV
- Deep underwater: any position with > 20% loss
Output format
One markdown block, max 1 page:
## Portfolio Snapshot — {date} {time}
### Account: {account_id}
| Metric | Value |
|------------------|-----------|
| Net Liquidation | $XXX,XXX |
| Buying Power | $XX,XXX |
| Margin Used | $XX,XXX |
| Cushion | XX% |
| Unrealized P&L | +$X,XXX |
| Realized P&L | +$X,XXX |
| Open Positions | XX |
### Allocation
| Asset Class | Value | % of NLV |
|-------------|-----------|----------|
| Stocks | $XXX,XXX | XX% |
| Options | $X,XXX | X% |
| Cash | $XX,XXX | XX% |
### Positions (by size)
| Ticker | Qty | Mkt Value | Unreal P&L | % of NLV | % P&L |
|--------|------|-----------|------------|----------|--------|
| AAPL | 100 | $17,500 | +$1,200 | 12% | +7.4% |
| ... | | | | | |
### Notable
- Biggest winner: {ticker} (+${pnl}, +X%)
- Biggest loser: {ticker} (-${pnl}, -X%)
- Concentration: {ticker} at {X}% of NLV {warning if >25%}
### Cash by Currency
| Currency | Settled | Total |
|----------|----------|----------|
| USD | $XX,XXX | $XX,XXX |
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.
- 5d ago First seen · 142 lines · 67 tokens per session scan A 89c0aab6f1a0
portfolio-report is a skill published in the GitHub repository oh-rid/claude-code-plugin-ib (5 stars, last pushed 3mo ago), licensed MIT. It adds 67 tokens to every session and 1,214 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 skills, from other repositories
sector-rotation
行业轮动分析——申万行业景气度评分、行业动量排名、产业链传导、估值/盈利/资金流多维比较框架.
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…
strategy-pivot-designer
Detect backtest iteration stagnation and generate structurally different strategy pivot proposals when parameter tuning reaches a local optimum.
chenhao-limit-up
Use when evaluating A-share limit-up (涨停板) setups through Chen Hao's sentiment and momentum lens: market emotion cycles, board strength, follow-through, and short-term aggressive momentum trading.
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.