简介
Skill
原始描述
Deterministic-first portfolio analyzer — holdings, performance, Sharpe + Sortino, FRED yield curves, bond duration, sector breakdowns, scenario rebalancing —...
通过你的 Agent 添加
点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。
或者手动安装
包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。
技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。
技能正文
name: investorclaw description: Deterministic-first portfolio analyzer for Claude Code via MCP-HTTP at localhost:18090. Holdings, performance, Sharpe + Sortino, FRED yields, bond duration, scenario rebalancing. homepage: https://github.com/argonautsystems/InvestorClaw user-invocable: true metadata: {"license":"MIT-0","version":"4.7.7","runtime":"claude-code","image":"ghcr.io/argonautsystems/ic-engine:4.7.7-cpu","mcp-endpoint":"http://localhost:18090/mcp"}
InvestorClaw — Claude Code Plugin (v4.0)
Powered by InvestorClaw (Apache 2.0). This plugin is MIT-0-licensed.
What this is
InvestorClaw is a containerized portfolio analysis service. The user
runs it locally as two Docker containers via docker compose up -d;
this Claude Code plugin is the thin client that registers the service's
MCP servers with your agent and exposes two convenience slash commands.
The plugin is a manifest + this SKILL.md + a one-time config write that points Claude Code at two HTTP MCP endpoints on localhost. All analysis happens inside the user's Docker containers — the agent never installs or imports anything.
This is the current Claude Code / Claude Desktop path. The plugin
installs directly from this repo and uses the same skill bundle and
same container-first runtime as every other agent. See
docs/GETTING_STARTED.md for the canonical setup.
Slash commands the plugin exposes
The plugin registers two slash commands so portfolio questions don't depend on the LLM spontaneously deciding to call MCP tools:
-
/ask <question>— routes to theinvestorclaw.portfolio_asktool. Pass the user's natural-language portfolio question (e.g.,/ask what are my top 5 dividend payers?). The deterministic engine picks the right analyzer and returns a structuredic_resultplus narrative text. -
/refresh— routes toinvestorclaw.portfolio_refresh. Pulls fresh market data without re-uploading portfolio files. Use this when the user has been chatting for a while and quotes may be stale.
These commands are deterministic entry points: the user types the slash command, Claude Code dispatches it to the named MCP tool, the engine returns structured output. No LLM routing decision is involved at the slash-command boundary. This is by design — slash commands are load-bearing for reliability.
MCP tools available (after install)
When InvestorClaw is running and the plugin is loaded, your tool catalog gains:
Portfolio analysis (investorclaw.*)
investorclaw.portfolio_ask— natural-language question router (also invoked by/ask)investorclaw.portfolio_refresh— market-data refresh (also invoked by/refresh)investorclaw.portfolio_holdings— current snapshot of positions, values, weightsinvestorclaw.portfolio_performance— Sharpe, volatility, top/bottom performers, max drawdowninvestorclaw.portfolio_bonds— bond analytics (YTM, duration, FRED yield curve)investorclaw.portfolio_analyst— analyst ratings per holdinginvestorclaw.portfolio_news— news correlation for held positionsinvestorclaw.portfolio_lookup— ticker / account lookupinvestorclaw.portfolio_optimize— Sharpe / min-vol optimizationinvestorclaw.portfolio_rebalance— current vs target with tax impactinvestorclaw.portfolio_scenario— what-if scenarios on holdingsinvestorclaw.portfolio_cashflow— projected cashflow from bondsinvestorclaw.portfolio_peer— peer comparison vs benchmarkinvestorclaw.portfolio_setup— auto-discover portfolio files in/data/portfolios/inside the containerinvestorclaw.portfolio_guardrails— view/configure educational-only guardrails
Memory (mnemos.*)
mnemos.search_memories— full-text + semantic search across remembered observationsmnemos.create_memory— record an observation about the user's preferences, prior questions, or current investing contextmnemos.list_memories— browse by category / date
What to ask — example queries
| Intent | Phrasing |
|---|---|
| Holdings | "What's in my portfolio?" • "Show me my positions" |
| Performance | "How am I doing this year?" • "What's my Sharpe ratio?" |
| Bonds | "Show me my bond exposure and yield-to-maturity" |
| Allocation | "What's my sector exposure?" • "How concentrated am I?" |
| Optimization | "Help me rebalance to a 60/40 target" |
| Market data | "What's the current price of NVDA?" |
| News | "Today's news on my holdings" |
| Reports | "Generate today's EOD report" • "Prepare an advisor brief" |
| Fresh data | "Prices moved — refresh before answering" → /refresh |
The first call after a cold cache may take 30–60 seconds while the deterministic pipeline builds the signed envelope. Subsequent calls reuse the cache.
Recommended model split
Claude Code uses the agent's own LLM — no external API key required.
- Narrative: Haiku 4.5 — fast, cheap, ~10× lower output cost than Sonnet. With a clean signed envelope, narrative synthesis is mostly transcription, so the cheap model is sufficient.
- Validator: Sonnet 4.6 (default) or Opus 4.7 (escalation) — gates the Haiku output for fabrication, mis-quoted numbers, and training-leak drift. Validator output is short (~1 K tokens), so the smart-model bill stays low.
Cost-shaped: cheap model on the long output, smart model on the short safety check. Total session cost on a 100-position portfolio typically lands well under $0.01.
How to use it
-
For portfolio questions: prefer
/ask "<question>". It's deterministic and surfaces the structuredic_resultenvelope directly. Decorate the narrative if the user wants more context, but trust the engine's numbers — they are computed in code, not inferred. -
For follow-up questions: call
mnemos.search_memoriesfirst to pull relevant prior observations (e.g., user's risk tolerance, prior discussions about specific holdings). Then call the appropriateinvestorclaw.*tool with that context in mind. -
For "what changed" questions: call
mnemos.search_memoriesfor prior portfolio summaries; compare against the currentinvestorclaw.portfolio_holdingsoutput. -
After delivering an analysis: call
mnemos.create_memoryto record any salient observations the user might want to remember (e.g., "User flagged BABA as a never-sell sentimental position during the 2026-04-30 review"). Don't over-record — only record what wouldn't be obvious from re-reading the data later. -
When the user uploads a portfolio file: stage the attachment to the bind-mounted
portfolios/directory (see top-level SKILL.md for the agent file-staging contract), then callportfolio_setupfollowed byportfolio_ask. Or direct the user to the dashboard at http://localhost:18092 if they prefer to drop files there directly.
Presentation rules
- Preserve quoted source text, numerical values, timestamps, and freshness labels exactly.
- Never fabricate market, ticker, bond, news, or optimization data.
- If the engine's signed envelope lacks a requested fact, say InvestorClaw did not provide it and quote the engine's limitation verbatim.
- If data looks stale, suggest
/refreshbefore answering.
Important behaviors
-
Deterministic at the data layer. The investorclaw tools compute numbers in code. If a portfolio format isn't recognized, you'll get a structured error with detected columns and supported formats. Don't ask the LLM to disambiguate — surface the error and direct the user to the dashboard's column-mapping wizard at http://localhost:18092/portfolios/map.
-
Educational only — never investment advice. All outputs include a disclaimer envelope. Echo it when summarizing for the user. Do not recommend specific buys or sells.
-
No money movement, no trades. This plugin cannot execute trades, move money, place orders, or access brokerage accounts. If the user asks for any of those, decline and direct them to a licensed advisor.
-
Local by default. MCP endpoint is on
localhost:18090(REST + MCP); dashboard is onlocalhost:18092. If the user has deployed the service to a remote host (Tailscale VM, cloud), the URLs change but the tool surface is identical — the user edits the manifest's MCP server URL.
When the plugin can't reach the service
If investorclaw.* calls fail with connection errors, the user's
Docker containers aren't running. Tell the user:
- Open a terminal and run
docker compose psin~/.investorclaw/ - If containers aren't listed:
cd ~/.investorclaw && docker compose up -d - If Docker itself isn't installed: see INSTALL.md for the prereq link
- If the MCP servers still don't respond after
docker compose up -d: wait ~10 seconds for health checks, then retry
See INSTALL.md for the full bring-up sequence.
Install
Claude Code / Claude Desktop:
/plugin marketplace add argonautsystems/InvestorClaw
/plugin install investorclaw
OpenClaw / ZeroClaw / Hermes users: install via ClawHub:
clawhub install investorclaw
What this plugin does NOT do
- Does not install or execute any code on the agent side — it's a manifest, this SKILL.md, and an MCP-server config write
- Does not download or execute portfolio data on the agent side
- Does not manage credentials (the engine reads broker CSVs the user drops in the dashboard)
- Does not execute trades or move money
- Does not give investment advice
License + attribution
- This plugin (manifest, SKILL.md, INSTALL.md) is MIT-0-licensed.
- The InvestorClaw service it connects to is Apache 2.0, hosted at
github.com/argonautsystems/InvestorClawand the runtime container atmnemos-os/ic-engine. - The MNEMOS memory service is Apache 2.0, hosted at
mnemos-os/mnemos-rs.
Powered by InvestorClaw (Apache 2.0). This plugin is MIT-0-licensed.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。