This skill operates in two modes: Setup (Step 0) and Analysis (Steps 1–9). Step 0 runs only when prerequisites are missing; once everything is configured, jump directly to analysis.
Run these checks in order. Stop at the first failure and guide the user to fix it before continuing.
Run wyckoff --version.
Success → proceed to 0.2.
Failure → guide installation: text
pip install youngcan-wyckoff-analysis
Or one-line install: text
curl -fsSL https://raw.githubusercontent.com/YoungCan-Wang/Wyckoff-Analysis/main/install.sh | bash
After install, verify with wyckoff --version again.
Run wyckoff auth status.
Logged in → proceed to 0.3. (Credentials are auto-saved; token expiry triggers automatic re-login.)
Not logged in → guide registration and login:
wyckoff auth login <email> <password> (credentials will be persisted, no need to login again).wyckoff auth status.Run wyckoff config show.
tushare_token present → OK.
tushare_token missing → guide:
wyckoff config tushare <token>tickflow_api_key present → OK.
tickflow_api_key missing → guide:
wyckoff config tickflow <api_key>Note: At least one data source (tushare or tickflow) must be configured. Both are recommended for better coverage.
Run wyckoff model list.
wyckoff model add (interactive) or wyckoff model set <name> <provider> <api_key> --model <model_name>.After all checks pass, ask the user whether they want to register the Wyckoff MCP Server with their AI tools (Claude Code / Cursor / etc.).
User says yes → guide: text
pip install "youngcan-wyckoff-analysis[mcp]"
claude mcp add wyckoff -- wyckoff-mcp
Once registered, the MCP client can directly call 14 Wyckoff tools (diagnose_stock, screen_stocks, get_signal_pending, etc.) without going through the CLI TUI.
If the user uses a non-Claude MCP client, guide them to add this to their MCP config: json
{
"mcpServers": {
"wyckoff": {
"command": "wyckoff-mcp",
"env": {
"TUSHARE_TOKEN": "<token_from_wyckoff.json>",
"TICKFLOW_API_KEY": "<key_from_wyckoff.json>"
}
}
}
}
Credentials already saved in wyckoff.json are also auto-read by the MCP server, so env vars are optional if wyckoff login + wyckoff config have been run.
User says no / skip → proceed directly to analysis.
When all checks pass, print a brief summary and proceed to analysis.
When the user's intent is operational (not analysis), route directly to the appropriate CLI command instead of running the analysis pipeline:
IntentCommandView portfoliowyckoff portfolio listAdd positionwyckoff portfolio add <code> <shares> <cost>Remove positionwyckoff portfolio rm <code>Set cashwyckoff portfolio cash <amount>View signalswyckoff signalView recommendationswyckoff recommendScreen marketwyckoff screenRun backtestwyckoff backtest <code>Generate reportwyckoff report <codes>Launch dashboardwyckoff dashboardView chat logswyckoff logManage memorywyckoff memorySync cloud datawyckoff syncCleanup local datawyckoff cleanupUpdate CLIwyckoff updateRegister MCP Serverpip install "youngcan-wyckoff-analysis[mcp]" && claude mcp add wyckoff -- wyckoff-mcp
For the full CLI reference, see rules/cli-setup-guide.md.
Accept any combination of:
holdings: [symbol+cost+qty, ...].cash: available cash amount.candidate: optional non-holding symbol.Infer scenario automatically:
holdings non-empty + candidate: rotation comparison + per-holding actions.holdings non-empty + no candidate: per-holding add/reduce/hold/exit.holdings empty + cash: empty-position cash deployment.Do not require users to explicitly say "switch/add/reduce/empty-position."
{symbol, cost, qty}.Asia/Shanghai.当前北京时间:YYYY-MM-DD HH:MM(UTC+8).09:30-11:30, 13:00-15:00 (Beijing time).rules/source-fallbacks.md strictly for each symbol.MA50/ MA200.add / reduce / hold / exit.switch / partial switch / hold.rules/alpha-system-prompt.md.data_unavailable and continue others.insufficient structure depth and avoid hard phase labels.For detailed capability-routing policy, read rules/system-capability-playbook.md.
Always output in this order:
当前北京时间:YYYY-MM-DD HH:MM(UTC+8)当前是否可盘中交易:是/否 (with reason if no).symbol, source_used, rows_kept, window_end_date, fallback_count.rules/alpha-system-prompt.md: fixed role and hard rules.rules/source-fallbacks.md: online source switching policy.rules/system-capability-playbook.md: full system capability routing and degrade policy.rules/cli-setup-guide.md: CLI installation, registration, MCP setup, and command reference.