Claude-skill-registry diagnose
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/diagnose" ~/.claude/skills/majiayu000-claude-skill-registry-diagnose && rm -rf "$T"
manifest:
skills/data/diagnose/SKILL.mdsource content
Trading System Diagnostics
Purpose
Use this skill when:
- No trading signals are being generated
- Need to verify AI analysis is working
- Validating technical indicator calculations
- Debugging market data issues
Diagnostic Commands
Full Diagnostic (Default)
cd /home/linuxuser/nautilus_AItrader source venv/bin/activate python3 scripts/diagnose.py
Quick Diagnostic (Skip AI calls)
cd /home/linuxuser/nautilus_AItrader source venv/bin/activate python3 scripts/diagnose.py --quick
With Update and Restart
python3 scripts/diagnose.py --update --restart
Expected Output
Normal Operation Signs
✅ Configuration loaded successfully ✅ Market data fetched successfully ✅ TechnicalIndicatorManager initialized ✅ Technical data retrieved ✅ Sentiment data retrieved ✅ MultiAgent 层级决策成功 🐂 Bull Agent 分析中... 🐻 Bear Agent 分析中... ⚖️ Judge Agent 判断中... 🛡️ Risk Manager 评估中... 🎯 Judge 最终决策: BUY/SELL/HOLD
Key Checkpoints
| Check | Normal Value | Abnormal Handling |
|---|---|---|
| RSI | 0-100 | Out of range = data error |
| MACD | Any value | NaN = insufficient data |
| Judge Signal | BUY/SELL/HOLD | ERROR = API failure |
| Winning Side | BULL/BEAR/TIE | 显示辩论胜方 |
信号决策流程 (层级决策架构)
v6.0 更新: 采用 TradingAgents 层级决策架构,Judge 决策即最终决策
决策流程: Phase 1: Bull/Bear Debate (辩论) └→ 🐂 Bull Agent: 寻找做多理由 └→ 🐻 Bear Agent: 寻找做空理由 Phase 2: Judge (Portfolio Manager) Decision └→ ⚖️ 评估辩论结果,做出最终决策 Phase 3: Risk Evaluation └→ 🛡️ 确定仓位大小和止损止盈
注意: 以下配置已标记为 LEGACY,不再生效:
skip_on_divergence: true # [LEGACY] 不再使用 use_confidence_fusion: true # [LEGACY] 不再使用
Common Issues
1. No Trading Signals
Possible Causes:
- Judge returns HOLD (Bull/Bear辩论无明显胜者)
- Confidence below min_confidence_to_trade
- Risk Manager 认为风险过高
Check Command:
python3 scripts/diagnose_realtime.py 2>&1 | grep -E "(Judge|Final Signal|Confidence|Winning Side)"
2. DeepSeek API Failure
Check:
grep "DEEPSEEK_API_KEY" ~/.env.aitrader
3. Abnormal Technical Indicators
Check:
python3 scripts/diagnose.py 2>&1 | grep -E "(RSI|MACD|SMA)"
Key Files
| File | Purpose |
|---|---|
| Main diagnostic script |
| Real-time API diagnostic |
| Regression detection (auto-evolving rules) |
| Main strategy logic |
| Base configuration (all parameters) |
| Production environment overrides |
回归检测 (修改代码后必须运行)
# 智能回归检测 (规则自动从 git 历史生成) python3 scripts/smart_commit_analyzer.py # 预期结果: ✅ 所有规则验证通过