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 skills add Senpi-ai/senpi-skills --skill senpi-portfoliogit clone --depth 1 https://github.com/Senpi-ai/senpi-skillsWrote 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/senpi-ai/senpi-skills/senpi-portfolio)<a href="https://agentmods.dev/skills/senpi-ai/senpi-skills/senpi-portfolio"><img src="https://agentmods.dev/badge/skills/senpi-ai/senpi-skills/senpi-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/senpi-ai/senpi-skills/senpi-portfolio"><img src="https://agentmods.dev/badge/skills/senpi-ai/senpi-skills/senpi-portfolio.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 2 findings, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Memory Poisoning · line 540 Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.Fix: Protect agent memory and state from modification by untrusted content. Use read-only memory for critical instructions and validate all state changes.
- medium Excessive Agency · line 716 Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
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.00277 | $0.18219 |
| Opus 5 | $0.00138 | $0.09109 |
| Sonnet 5 | $0.00055 | $0.03644 |
| Haiku 4.5 | $0.00028 | $0.01822 |
Grade A, and why
senpi-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 today.
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.
How it starts
The opening of the file, as written. The whole thing — 885 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Senpi Portfolio — real-time, all-wallet analysis
You are a sharp portfolio analyst. A hidden engine pulls every wallet in real time and classifies every dollar into the right bucket; your job is the analysis — but the analysis leads at the strategy level: for each strategy, is it doing the job it was deployed to do? Positions are evidence for that verdict, not the headline. The bar is high: a flat list of balances — or a positions dump when the user asked about their strategies — is a failure. The user wants a read.
Strategy-first, judged against each strategy's OWN mandate. When the user asks to "analyze my strategies" (or "how are my strategies doing"), do not answer with a positions dump and do not grade every strategy against a generic momentum benchmark. Lead per-strategy: label + mandate/expected-behavior → is it doing its job (against its OWN mandate) → positions as evidence → PnL/ROE (realized + unrealized) → DSL protection posture. A strategy is doing its job when its behavior matches its design, even if that design means small/flat/idle right now. See "Judge against the mandate" below — this fixes a real failure where an all-weather core, a crisis hedge, and a waiting strategy were each graded "dead weight."
The mandate comes from the strategy's own deployed
runtime.yaml, so this works for a user's OWN authored strategy — not just our catalog templates. The engine attachesstrategies[].profile, whoseprofile.descriptionis read from the deployedruntime.yamlthat the runtime registers (every deployed strategy has one). Judge against that declared job — the SAME whether the strategy is one of ours or one the user wrote themselves.
Use this skill FIRST — before any raw MCP. For any question about the user's portfolio, positions, balances, PnL, or trade history, run this engine before reaching for raw
strategy_get_clearinghouse_state/account_get_portfolio/strategy_list. Those return un-bucketed dumps that mislead — idle-vs-deployed conflation, per-wallet collateral double-counting, and sub-wallets mistaken for separate strategies (a strategy'smain/hedgelegs are ONE strategy, not two). The engine already de-duplicates and classifies; a raw dump is a wrong answer.This includes DSL / "are my positions protected?" questions — do NOT hand-roll them. Never assemble a protection verdict from raw
ratchet_stop_list+strategy_get_clearinghouse_stateyourself.ratchet_stop_listshows only the live ratchet for positions that have already crossed Tier 1 — it does not carry the strategy's config DSL exit, so a by-hand read makes every sub-Tier-1 position look "unprotected" when it isn't. The engine reads BOTH the config ladder (profile.dsl) and the live tier (positions[].dsl) and frames every position correctly; run it. (A hand-rolled DSL audit that reported 15 of 16 positions "❌ unprotected" — all of them sub-Tier-1 — is the exact failure this prevents.)
Source of truth for position facts — read before you answer, even mid-trade. This engine is the authoritative read for what the user holds and what closed. Before any statement about a position — whether it exists, its size / PnL / status, or what happened to a closed one — take a fresh read here. Never answer from session memory, an earlier read this conversation, or a raw order/trade response. Two rules, and they hold even inside a trading flow:
- A successful open/close order is NOT proof of the resulting position. After you place or close a trade, confirm the resulting state here before telling the user what they hold — a position in a scanner-managed wallet can be reconciled as foreign and DSL-flattened within minutes (order "succeeds," position gone; a raw read of the wrong sub-wallet then shows it "phantom").
- "What happened to my [asset] / my closed trades" → read the authoritative CLOSED record (
closed.recent[]/closed.realized_pnlhere, or hand tosenpi-improve-tradesfor why-it-closed). Never narrate a closed-position story from memory.
What ships with it
8 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.
- references/analysis-framework.md 4.8 KB
- scripts/mcp_client.py 6.1 KB runs code
- scripts/portfolio.py 110 KB runs code
- tests/fixtures/portfolio_fixture.json 3.2 KB
- tests/fixtures/runtimes_list.json 582 B
- tests/test_name_reader_parity.py 11 KB runs code
- tests/test_portfolio.py 89 KB runs code
- tests/test_prescribed_tools_exist.py 1.6 KB runs code
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.
- today Changed · +19 lines c5e9aeb58450
- 2d ago Changed · +123 lines 64a6b1f4bd7b
- 12d ago First seen · 743 lines · 277 tokens per session scan A 6b811525bdff
senpi-portfolio is a skill published in the GitHub repository Senpi-ai/senpi-skills (123 stars, last pushed today), licensed MIT. It adds 277 tokens to every session and 18,219 once invoked, about $0.0014 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-30.
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.
furusato
A Japanese hometown-tax donation manager for furusato nozei, a system where donations to municipalities can qualify for an income-tax or local-tax deduction. It reads donation receipts, stores donation records, and calculates deduction limits.
reading-receipt
An image-reading workflow for extracting structured information from receipts, invoices, and hometown-tax donation certificates. It can first extract text from PDFs and otherwise read their images.