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 skills add leionion/ClawForge --skill strategy_backtestgit clone --depth 1 https://github.com/leionion/ClawForgeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/leionion/clawforge/strategy_backtest)<a href="https://agentmods.dev/skills/leionion/clawforge/strategy_backtest"><img src="https://agentmods.dev/badge/skills/leionion/clawforge/strategy_backtest/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/leionion/clawforge/strategy_backtest"><img src="https://agentmods.dev/badge/skills/leionion/clawforge/strategy_backtest.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.00092 | $0.00708 |
| Opus 5.5 | $0.00037 | $0.00283 |
| Sonnet 5.5 | $0.00018 | $0.00142 |
| Haiku 4.5 | $0.00009 | $0.00071 |
Grade A, and why
strategy-backtest 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 3mo 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 — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.
strategy-backtest — Quantitative Strategy Backtesting
Runs strategy backtests on historical OHLCV data and returns performance metrics as JSON. Supports SMA crossover strategy with configurable fast/slow periods.
Usage
# Demo mode — uses built-in sample_ohlcv.csv
python3 strategy_backtest.py
# Backtest with custom CSV data
python3 strategy_backtest.py --data path/to/ohlcv.csv
# Backtest with JSON string input
python3 strategy_backtest.py --data '[{"open":10,"high":11,"low":9,"close":10.5,"volume":100}]'
# Custom SMA periods
python3 strategy_backtest.py --data prices.csv --fast 10 --slow 30
# Human-readable output
python3 strategy_backtest.py --data prices.csv --output print
Parameters
| Flag | Default | Description |
|---|---|---|
--data |
sample_ohlcv.csv |
CSV path or JSON string (OHLCV) |
--strategy |
sma_crossover |
Strategy type |
--fast |
5 |
Fast SMA period |
--slow |
20 |
Slow SMA period |
--output |
json |
Output format (json or print) |
Supports column names in English (open/high/low/close/volume) or Chinese AKShare format (开盘/收盘/最高/最低/成交量/日期).
Example output
{
"total_return": 0.0523,
"sharpe_ratio": 1.2345,
"max_drawdown": -0.0812,
"win_rate": 0.6,
"trade_count": 10,
"trades": [
{"date": "2024-01-15", "action": "buy", "price": 150.25},
{"date": "2024-02-01", "action": "sell", "price": 158.50, "pnl": 0.0549}
]
}
Error handling
- Missing pandas: prints
{"error": "pandas required: pip install pandas"} - Missing columns: reports which OHLCV columns are absent
- Insufficient data: returns error if fewer rows than the slow SMA window
- Unknown strategy: reports the unrecognized strategy name
Programmatic API
from strategy_backtest import run_backtest
metrics = run_backtest("prices.csv", strategy="sma_crossover", fast=5, slow=20)
Related skills
- hhxg-top-hhxg-python: fetch A-share OHLCV data → feed into this skill
- session-memory: store backtest metrics for later comparison
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 3mo ago First seen · 75 lines · 92 tokens per session scan A a0b51d994d81
strategy-backtest is a skill published in the GitHub repository leionion/ClawForge (88 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 92 tokens to every session and 708 once invoked, about $0.0004 per session on Opus 5.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-30.
strategy-backtest compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| strategy-backtestleionion/ClawForge | Skill | 88 | 7mo ago | Apache-2.0 | A | 92 | Claude Code, Codex |
| senpi-portfolioSenpi-ai/senpi-skills | Skill | 146 | today | MIT | A | 385 | Claude Code, Codex |
| senpi-strategy-opsSenpi-ai/senpi-skills | Skill | 146 | today | MIT | A | 708 | Claude Code, Codex |
| senpi-strategy-discoverSenpi-ai/senpi-skills | Skill | 146 | today | MIT | A | 235 | Claude Code, Codex |
| senpi-trader-researchSenpi-ai/senpi-skills | Skill | 146 | today | MIT | A | 256 | Claude Code, Codex |
| senpi-market-pulseSenpi-ai/senpi-skills | Skill | 146 | today | MIT | A | 139 | Claude Code, Codex |
| senpi-smart-moneySenpi-ai/senpi-skills | Skill | 146 | today | MIT | A | 157 | Claude Code, Codex |