From invest
Sets up a fresh openInvest deployment via a 5-question interactive flow or connects to an existing hub. Wraps `run.sh init` for first-time onboarding.
How this skill is triggered — by the user, by Claude, or both
Slash command
/invest:invest-setupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Single responsibility**: turn an empty openInvest deployment into a working one.
Single responsibility: turn an empty openInvest deployment into a working one.
Triggers only on the user's first-time setup — run once, then step aside (the
invest skill takes over all day-to-day interaction).
invest skill's doctor returns status: "needs_setup" (memory / user_profile missing)--force)doctor returns status: "ready") → switch to the invest skillinvest skillinvest skill's POST /api/holdings endpointIf you (the agent) entered this skill by mistake, exit immediately and tell the
user to use the invest skill instead.
| Path | Scenario | Flow |
|---|---|---|
| A. Fresh deployment (default) | User's first time with openInvest; data lives on this machine | "Flow (4 steps)" below |
| B. Connect to an existing hub | User already runs openInvest on another machine (a server) and wants this machine to share the same data (multi-device) | "Path B" below, 2 minutes |
Phrasings that trigger Path B: "connect to my hub / 连接我的 hub" / "it's already installed on my server / 我服务器上已经装好了" / "share one portfolio across machines / 多台电脑共用持仓" / "connect to my existing deployment".
https://invest.example.com or http://10.0.0.6:8765)INVEST_API_TOKEN) or a Cloudflare
Access service token (CF_ACCESS_CLIENT_ID/SECRET)? Skip if not enabled.$INVEST_HOME/.env (only these two or three lines are
needed; no DeepSeek key / Gmail / 5-question flow — those all live on the hub):
INVEST_API_BASE=https://invest.example.com
INVEST_API_TOKEN=... # optional
run.sh doctor → it should return status: "ready" plus a remote
section (api_base / auth method). If it can't connect, the error JSON's hint
tells you whether the problem is the address, the token, or the hub service
not running.invest skill.Note: Path B must not run init (init is disabled in remote mode and will
error); no memory/ is created on this machine — all data stays on the hub.
doctor first to confirm setup is really needed~/.claude/skills/invest-setup/scripts/run.sh doctor
Returns status: "ready" → exit immediately and tell the user "you're already
onboarded — just use the invest skill".
Returns status: "needs_setup" → go to step 2.
AskUserQuestion on the Coordinator path, your conversational tool on the Direct path)| # | Ask | Notes |
|---|---|---|
| Q1 | What should we call you? | display name; Anonymous if they'd rather not say |
| Q2 | Risk tolerance? | Conservative / Balanced / Aggressive |
| Q3 | Monthly income / monthly expenses / FX working buffer (CNY)? | three numbers; all can be 0 to skip |
| Q4 | What do you currently hold? (free-form description) | natural language, see below |
| Q5 | DeepSeek API key & Gmail App Password? | Optional. Not needed on the Coordinator path |
Do not ask field by field. Let the user describe their holdings in one sentence:
"510300 CSI 300 ETF, 3000 shares at 4.2 CNY; 80k in CMB Zhaozhaobao; 50 grams of ICBC gold accumulation at 750 average cost" "AAPL 100 shares at 150 USD cost, 0.3 BTC, 50k CNY cash" "Nothing at all, just 10k CNY"
When the backend cmd_init sees a holdings_description field it calls DeepSeek to
parse it into the v2 schema. Without a DeepSeek key it falls back to v1 fields
(only cash_cny / aud_cash get written into the portfolio) —
tell the user about this.
Boundary rules to tell the user (not enforced):
510300) — no .SS suffix needed0700.HK or "Tencent")BTC / ETH)If the user reveals "this account is pocket money" / "I have an emergency reserve" / "family backup" → ask one more question:
Do you have an emergency fund / family backup outside this portfolio? Roughly how much? (Family funds cannot be used for investing — they only serve to prevent the "low cash = high risk" misjudgment.)
Record it into wealth_context:
wealth_context:
emergency_buffer_cny: 200000 # or whatever number the user gives
family_backup_available: true
account_purpose: "pocket-money account" # the user's own words
lifestyle_notes: "..."
See docs/wiki/12-verification.md claim 7 (WealthContextOfficer) for details.
echo '{
"display_name": "...",
"risk_tolerance": "Balanced",
"monthly_income_cny": 30000,
"monthly_expense_cny": 15000,
"exchange_buffer_cny": 10000,
"holdings_description": "<the user's exact words from Q4>",
"wealth_context": { ... }, # optional
"deepseek_api_key": "...", # optional
"gmail_app_password": "..." # optional
}' | ~/.claude/skills/invest-setup/scripts/run.sh init --from-stdin
Returns JSON:
{
"status": "ok",
"holdings_parse_note": "...", // natural-language parse result, **show it to the user**
"memory_root": "/path/...",
"next_step": "run status via the invest skill to view holdings"
}
After it finishes:
holdings_parse_note to the user (so they can confirm the parse is correct)doctor again to confirm status: "ready"init response--force to confirm explicitlyA: When editing .env, the model name must change too:
LLM_API_KEY=...
LLM_BASE_URL=...
LLM_MODEL=qwen-max # ← don't forget this
Changing only the API key + base_url while the model stays deepseek-chat → the
upstream returns 400 "model not found". Every provider names its models differently —
check the provider's own site.
A: Check whether the memory/.committee/<today>/<asset>.md file was generated. If
not, something failed during the call — run run.sh doctor and see which item's
hint is red.
A: Run run.sh update (pulls the latest release from PyPI). openInvest is still
iterating quickly.
The detailed 5-step flow lives in the original references/onboarding.md (179 lines).
This SKILL.md is the condensed agent-trigger guide.
npx claudepluginhub longsizhuo/openinvest --plugin investMulti-asset AI investment committee: view portfolio, live prices, P&L, strategy, decision history, adjust positions, and run a 4-role LLM committee for buy/sell verdicts. Supports any yfinance symbol and currency.
Recommends the right trading workflow, skillset, and setup path from a natural-language goal. Use as an on-ramp for new users.
Installs the Gangtise OpenAPI skill suite (19 skills) with one command. Configures accessKey/secretAccessKey credentials and runs health diagnostics.