senpi-portfolio
Analyze the user's portfolio, strategies, positions, and trades across all wallets — main embedded wallet, strategy sub-wallets, deployed vs idle — with real-time balances and real analysis, not a flat dump. Leads at the STRATEGY level: each strategy judged against its OWN mandate (is it doing its job?), with positions as evidence. Use this skill FIRST for ANY portfolio / strategies / positions / balances / PnL / trade-history question, BEFORE any raw strategy_get_clearinghouse_state / account_get_portfolio / strategy_list MCP call. Use for "analyze my strategies", "how are my strategies doing", "analyze my portfolio", "how am I doing", "show my positions", "balance across all wallets", "how much is idle", and "are my open positions protected? / do they have a stop-loss?", and "tell me about my strategies and their DSL / what tier are my positions in?", and "what happened to my closed [asset] position / did my trade actually go through / do I still hold X" — the authority for position
Senpi-ai · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add Senpi-ai/senpi-skills --skill senpi-portfolio技能说明
name: senpi-portfolio description: >- Analyze the user's portfolio, strategies, positions, and trades across all wallets — main embedded wallet, strategy sub-wallets, deployed vs idle — with real-time balances and real analysis, not a flat dump. Leads at the STRATEGY level: each strategy judged against its OWN mandate (is it doing its job?), with positions as evidence. Use this skill FIRST for ANY portfolio / strategies / positions / balances / PnL / trade-history question, BEFORE any raw strategy_get_clearinghouse_state / account_get_portfolio / strategy_list MCP call. Use for "analyze my strategies", "how are my strategies doing", "analyze my portfolio", "how am I doing", "show my positions", "balance across all wallets", "how much is idle", and "are my open positions protected? / do they have a stop-loss?", and "tell me about my strategies and their DSL / what tier are my positions in?", and "what happened to my closed [asset] position / did my trade actually go through / do I still hold X" — the authority for position facts, OPEN and CLOSED, which come from a fresh engine read, never from memory or a raw order response. A hidden engine (scripts/portfolio.py) does the multi-wallet pull and taxonomy; you narrate. Requires a USER-scoped Senpi token. license: Apache-2.0 metadata: author: Senpi version: "1.15.0" platform: senpi exchange: hyperliquid requires: - senpi-trading-runtime
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.
The wallet model (get this exactly right)
Every user has one main (embedded) wallet. Funds flow: embedded wallet → strategy sub-wallet → positions. Each strategy is an isolated sub-wallet; no strategy trades from the embedded wallet.
Every dollar is in exactly one of three buckets — and the #1 mistake is conflating them:
| Bucket | Wh
阅读完整来源 ↗