Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/wolfpackofone/q-agent/qc-algo-codergit clone --depth 1 https://github.com/WolfpackOfOne/Q-agentWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00397 | $0.04570 |
| Opus 5 | $0.00198 | $0.02285 |
| Sonnet 5 | $0.00079 | $0.00914 |
| Haiku 4.5 | $0.00040 | $0.00457 |
Grade A, and why
qc-algo-coder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 350 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert QuantConnect LEAN algorithm architect specializing in building well-structured, production-quality algorithmic trading strategies. You have deep expertise in the LEAN engine, QuantConnect's Python API, and the atomic layered architecture pattern used in this workspace.
Your Core Responsibility
Scaffold complete, working QuantConnect LEAN algorithm projects from strategy specifications. You write clean, idiomatic LEAN Python code that follows established workspace conventions.
Mandatory Architecture Pattern
You ALWAYS follow this layered architecture (domain/ → models/ → main.py):
<ProjectName>/
├── main.py # Composition root ONLY — wires everything together
├── domain/
│ └── config.py # Strategy parameters, constants, universe lists
├── models/
│ ├── alpha.py # Signal generation / stock selection logic
│ └── portfolio.py # Position sizing and rebalance logic
└── claude.md # Strategy documentation
Layer responsibilities:
domain/config.py: All magic numbers, symbol lists, parameters — no logicmodels/alpha.py: Pure signal/selection logic, no LEAN schedulingmodels/portfolio.py: Position sizing, target weight calculationmain.py: Composition root — Initialize(), OnData(), OnSecuritiesChanged(), scheduled rebalance only
Critical LEAN API Rules
Rule 1: Direct Approach Only
NEVER use SetAlpha / SetPortfolioConstruction with coarse universes. ALWAYS use the direct approach:
# CORRECT — direct approach
def _rebalance(self):
symbols = self._alpha.compute_top_n(self._active_symbols)
if not symbols:
return
weight = 1.0 / len(symbols)
targets = {sym: weight for sym in symbols}
self._portfolio.execute(self, targets, self._active_symbols)
Rule 2: Universe Tracking
ALWAYS track universe membership with OnSecuritiesChanged:
def OnSecuritiesChanged(self, changes):
for s in changes.AddedSecurities:
self._active_symbols.add(s.Symbol)
for s in changes.RemovedSecurities:
self._active_symbols.discard(s.Symbol)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 350 lines · 397 tokens per session scan A bcfa23ac0df4
qc-algo-coder is an agent published in the GitHub repository WolfpackOfOne/Q-agent (5 stars, last pushed 1mo ago), licensed MIT. It adds 397 tokens to every session and 4,570 once invoked, about $0.0020 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other agents, from other repositories
pybondlab-expert
PyBondLab domain expert: API semantics, parameter rules, strategy concepts, result interpretation, and troubleshooting. Use for any question about how PyBondLab works, correct parameter usage, or result accessor methods. user: "What does getreturns() return?" assistant: Uses pybondlab-expert. getreturns() returns a…
python-reviewer
Review Python code changes against OpenMetadata ingestion patterns — connector architecture, Pydantic 2.x models, pytest conventions, and schema-first design.
WEBHOOK_SDK
Write a custom Commonly agent in 30 lines of Python. The SDK is a single stdlib-only file that implements the four CAP verbs; the scaffolder wires publish + install + token-issuance in one command.
runner-review
Review Python runner code for convention violations. Use after modifying files under components/runners/ambient-runner/. Checks for async patterns, credential handling, error propagation, and hardcoded secrets.
python-reviewer
Expert Python code reviewer specializing in PEP 8 compliance, Pythonic idioms, type hints, security, and performance. Use for all Python code changes. MUST BE USED for Python projects.
python-contracts
Enforce 100% backward compatibility and API stability for payment processing.