name: generate-agent-code description: Generates Python modules for the hybrid AI trading agent
When to Use
- When Claude is asked to generate trading logic, risk management, or dashboard code
- When the user requests the full agent codebase or specific modules
- When scaffolding new components that fit into the agent architecture
Instructions
- Create Python module files under the appropriate directories:
modules/,risk/,dashboard/,validation/,simulation/,utils/ - Include comments and Google-style docstrings for all public functions and classes
- Implement hybrid logic: combine momentum, mean-reversion, and AI predictor signals
- Integrate
risk_managerchecks before any trade execution - Ensure
proof_loggerhashes all trade inputs, outputs, and decisions - Create
main.pyto tie everything together as the entry point - Use configuration from
config/config.yamlorutils/config.py— never hardcode parameters - Include proper logging using Python's
loggingmodule - Use type hints for all function signatures
- Ensure each module can be imported and tested independently
Module Checklist
When generating the full agent, ensure these files exist:
- [ ]
main.py— orchestration entry point - [ ]
modules/momentum.py— momentum trading strategy - [ ]
modules/mean_reversion.py— mean-reversion trading strategy - [ ]
modules/yield_optimizer.py— yield optimization strategy - [ ]
modules/ai_predictor.py— AI prediction ensemble - [ ]
modules/strategy_manager.py— combines all strategy signals - [ ]
risk/risk_manager.py— risk validation and trade gating - [ ]
simulation/paper_trader.py— virtual trade execution - [ ]
validation/proof_logger.py— SHA256 proof hash logging - [ ]
dashboard/dashboard.py— Streamlit/Flask visualization - [ ]
utils/config.py— centralized configuration - [ ]
utils/data_loader.py— data ingestion - [ ]
utils/indicators.py— technical indicator calculations - [ ]
utils/logger.py— logging setup
Example
Input: "Generate the full trading agent with all modules"
Output: Complete Python module files for every component listed above, each with:
- Proper imports and type hints
- Docstrings explaining the module's purpose
- Core logic implementation
- Logging integration
- Risk management integration (where applicable)
- Proof logging integration (where applicable)
Input: "Generate the momentum strategy module"
Output: modules/momentum.py with:
- Moving average crossover logic
- Volume confirmation filters
- Signal generation with confidence score
- Configurable parameters from config
Related skills
Next.js App Router Expert
Development
A skill that turns Claude into a Next.js App Router expert.
Claude CodeCursoradvanced
890
234
3,180
README Generator
Development
Creates professional and comprehensive README.md files for your projects.
claudeCursorWindsurfbeginner
259
72
1,083
API Documentation Writer
Development
Generates comprehensive API documentation in OpenAPI/Swagger format.
claudeCursorWindsurfintermediate
156
44
943