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.
Step 0: Environment Detection & Guided Setup
Run these checks in order. Stop at the first failure and guide the user to fix it before continuing.
Note: At least one data source (tushare or tickflow) must be configured. Both are recommended for better coverage.
0.4 Model Check
Run wyckoff model list.
Has models → proceed to Step 1.
No models → guide: wyckoff model add (interactive) or wyckoff model set <name> <provider> <api_key> --model <model_name>.
0.5 MCP Server Setup (Optional — Ask User)
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:
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.
CLI Operational Commands
When the user's intent is operational (not analysis), route directly to the appropriate CLI command instead of running the analysis pipeline:
Intent
Command
View portfolio
wyckoff portfolio list
Add position
wyckoff portfolio add <code> <shares> <cost>
Remove position
wyckoff portfolio rm <code>
Set cash
wyckoff portfolio cash <amount>
View signals
wyckoff signal
View recommendations
wyckoff recommend
Screen market
wyckoff screen
Run backtest
wyckoff backtest <code>
Generate report
wyckoff report <codes>
Launch dashboard
wyckoff dashboard
View chat logs
wyckoff log
Manage memory
wyckoff memory
Sync cloud data
wyckoff sync
Cleanup local data
wyckoff cleanup
Update CLI
wyckoff update
Register MCP Server
pip install "youngcan-wyckoff-analysis[mcp]" && claude mcp add wyckoff -- wyckoff-mcp
For the full CLI reference, see rules/cli-setup-guide.md.