with one click
write-unit-tests
Generates unit tests for all trading agent modules
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Generates unit tests for all trading agent modules
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
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