一键导入
write-unit-tests
Generates unit tests for all trading agent modules
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generates unit tests for all trading agent modules
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Audits indicators, removes contradictions, and simplifies signals to a small coherent set
Implements confidence-weighted signal combination with dynamic weights and execution thresholds
Structures ERC-8004-style logs (identity, reputation, validation, intent) and produces deterministic hashes
Aligns risk gating (SL/TP, sizing, volatility, caps) with signal confidence to avoid blocking good trades
Ensures trades are executed only when confidence and risk checks pass; logs trades deterministically
Builds a dashboard to visualize trades, portfolio, and agent reasoning
| name | write-unit-tests |
| description | Generates unit tests for all trading agent modules |
tests/ directory, mirroring the module structure:
tests/test_momentum.py — tests for momentum strategytests/test_mean_reversion.py — tests for mean-reversion strategytests/test_yield_optimizer.py — tests for yield optimizertests/test_risk_manager.py — tests for risk management (critical)tests/test_proof_logger.py — tests for validation/proof hashingtests/test_ai_predictor.py — tests for AI ensemble predictortests/test_strategy_manager.py — tests for strategy combination logictests/test_paper_trader.py — tests for trade execution simulation{signal, confidence, metadata}Input: "Create unit tests for the trading agent"
Output: Complete pytest test files with:
# Run all tests
pytest tests/ -v --tb=short
# Run with coverage
pytest tests/ --cov=modules --cov=risk --cov=validation --cov-report=term-missing
# Run specific module tests
pytest tests/test_risk_manager.py -v