Claude-skill-registry Create Strategy (LEAN)
Use this skill when you need to add a new LEAN QCAlgorithm strategy in Python.
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/create-strategy" ~/.claude/skills/majiayu000-claude-skill-registry-create-strategy-lean && rm -rf "$T"
manifest:
skills/data/create-strategy/SKILL.mdsource content
Create Strategy (LEAN QCAlgorithm)
Use when adding a new strategy under the Strategy Lab
strategies/ workspace.
Steps
- Create the strategy file
- Path:
server/strategies/<StrategyName>.py - Must define a
class withQCAlgorithm
andInitialize
.OnData
- Use AERA-injected parameters
- Read with
and provide safe defaults:GetParameter(...)
,symbol
,resolution
,cash
,feeBpsslippageBps
- Keep it LEAN-safe
- No network I/O.
- Avoid writing files from the algorithm.
- Keep logs short (no spam).
- Verify
- Run from the app: Strategy Lab -> Run (LEAN) and inspect job logs/results.
- Run standard validations: see
.skills/verify_changes/SKILL.md
Template
Start from
skills/create_strategy/template_strategy.py.