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 1mo 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.
- 1mo ago First seen · 75 lines · 92 tokens per session scan A a0b51d994d81
strategy-backtest is a skill published in the GitHub repository leionion/ClawForge (89 stars, last pushed 5mo 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.
Other skills, from other repositories
okx-cex-portfolio
This skill should be used when the user asks about 'account balance', 'how much USDT do I have', 'my funding account', 'show my positions', 'open positions', 'position P&L', 'unrealized PnL', 'closed positions', 'position history', 'realized PnL', 'account bills', 'transaction history', 'trading fees', 'fee tier'…
ib_0dte
Find and place the best 0DTE (zero-days-to-expiration) credit spreads from Interactive Brokers. Default execution route is the EMA9/EMA21 + VIX/VXN regime strategy (emavix0dte.py), which auto-selects bullput or bearcall from a bare EMA cross and skips the trade when the vol index is elevated (VXN ≥ 35 for NDX/QQQ, VIX…
ib-trades-history
Fetch trade executions from Interactive Brokers filtered by account, date range, or symbol. Supports live API (7 days history) and FlexReport (full history). Use when user asks about their trades, executions, or transaction history. Requires TWS or IB Gateway running locally.
scanner-pmcc
Scan stocks for Poor Man's Covered Call (PMCC) suitability. Analyzes LEAPS and short call options for delta, liquidity, spread, IV, yield, trend direction, and earnings proximity. Use when user asks about PMCC candidates, diagonal spreads, or LEAPS strategies.
ib-trailing-stop
Server-side trailing stop management for stocks and naked LEAPS in IB. Places native TRAIL orders that auto-ratchet the stop as price climbs. Dry-run by default. Requires TWS or IB Gateway running locally.
clawmetry-selfcheck
Read your own agent telemetry from ClawMetry (waste, progress, cost) and act on it before finishing a task. Use when ClawMetry is installed on this machine and you want to check whether you are re-reading files, spinning in loops, or burning budget.