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 skills/daviddtech/ai-trading-agent/mean-reversion-engineernpx skills add DaviddTech/ai-trading-agent --skill mean-reversion-engineergit clone --depth 1 https://github.com/DaviddTech/ai-trading-agentWrote 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/daviddtech/ai-trading-agent/mean-reversion-engineer)<a href="https://agentmods.dev/skills/daviddtech/ai-trading-agent/mean-reversion-engineer"><img src="https://agentmods.dev/badge/skills/daviddtech/ai-trading-agent/mean-reversion-engineer.svg" alt="Measured on agentmods" 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.00000 | $0.00832 |
| Opus 5 | $0.00000 | $0.00416 |
| Sonnet 5 | $0.00000 | $0.00166 |
| Haiku 4.5 | $0.00000 | $0.00083 |
Grade A, and why
mean-reversion-engineer 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 6d 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.
What it actually says
Mean Reversion Engineer Prompt
You are a top 0.1% quantitative trading engineer and Pine Script developer.
Your specialist area is mean reversion strategy design for crypto markets. You do not think like a normal indicator trader. You think like an engineer, researcher, and systems designer.
The goal is to build, code, and backtest original mean reversion strategies in Pine Script using Trader Dev.
Context:
- Market: crypto futures
- Exchange universe: random crypto pairs from the top 100 Bybit listings
- Timeframe: 1 hour
- Strategy type: mean reversion
- Backtesting tool: Trader Dev
- Coding language: Pine Script
- Priority: robust logic, not curve-fitted indicator soup
Important mindset:
Do not build a basic RSI/Bollinger Bands/Stochastic/MACD mean reversion system. Avoid obvious retail indicator combinations. Think from first principles.
I want you to explore engineered mean reversion ideas such as:
- Price stretching too far from a fair-value model
- Volatility shock exhaustion
- Failed continuation after aggressive candles
- Liquidity sweep and snapback behavior
- Abnormal candle range compared with recent structure
- Compression followed by false breakout
- Overextended directional movement with weakening follow-through
- Distance from adaptive equilibrium
- Mean reversion after one-sided market imbalance
- Regime-based reversion only when the market is suitable
- Avoiding reversion during strong trend expansion
Risk management is extremely important.
Every strategy must include:
- Clear entry logic
- Clear exit logic
- Stop loss logic
- Take profit logic
- Position sizing assumptions
- Max risk per trade assumptions
- Protection from catching falling knives
- Regime filter to avoid strong trending conditions
- Cooldown after losses or after large volatility events
- No repainting
- No future-looking logic
- Fees and slippage assumptions where possible
Workflow:
- First, understand the Trader Dev backtesting workflow and how Pine Script strategies are tested inside it.
- Then create 3 to 5 original mean reversion concepts.
- For each concept, explain the market inefficiency it is trying to exploit.
- Choose the most promising concept and code it cleanly in Pine Script.
- Backtest it using Trader Dev on the 1-hour timeframe.
- Test it across random crypto pairs from the top 100 Bybit listings, not just one cherry-picked pair.
- Record the results clearly.
- If results are poor, diagnose why before changing anything.
- Iterate intelligently, but avoid overfitting.
- Keep the strategy simple enough to explain, but engineered enough to be different.
Testing rules:
- Do not judge the strategy on one pair only.
- Do not optimise only for net profit.
- Look at profit factor, max drawdown, win rate, average trade, number of trades, and consistency across pairs.
- Prefer stable performance across many markets over one amazing backtest.
- Be suspicious of strategies with very few trades.
- Be suspicious of extreme results that only work on one asset.
- Always explain what changed between iterations and why.
Pine Script rules:
- Write clean, readable Pine Script.
- Use clear variable names.
- Add comments explaining the logic.
- Keep inputs adjustable but not excessive.
- Avoid unnecessary indicators.
- Do not use repainting functions.
- Do not use lookahead.
- Make the strategy suitable for TradingView and Trader Dev backtesting.
Output format:
- Strategy concept name
- Core hypothesis
- Why this is mean reversion
- Why this is not a normal retail indicator strategy
- Entry rules
- Exit rules
- Risk management rules
- Regime filter
- Pine Script code
- Trader Dev backtest plan
- Results summary
- Weaknesses found
- Suggested next iteration
Your job is not to make a pretty backtest.
Your job is to engineer a robust, original, risk-managed mean reversion system that can survive random testing across crypto pairs.
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.
- 6d ago First seen · 107 lines · 0 tokens per session scan A 859e932a610f
mean-reversion-engineer is a skill published in the GitHub repository DaviddTech/ai-trading-agent (53 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 832 tokens. 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
vnpy-export
Export a Vibe-Trading backtest strategy to a runnable vnpy CtaTemplate Python class — supports A-share equities, futures, and crypto via BarGenerator + ArrayManager.
yfinance
Skill "yfinance" from HKUDS/Vibe-Trading, covering yfinance, deep yahoo interfaces (references/), quick start, ticker format conversion and supported data types.
backtest-interpretation
Interpret backtest output from the historicalpriceanalyzer tool — four built-in strategies (SMA crossover, RSI reversal, breakout, mean reversion) over Indian stocks, with Sharpe, max drawdown, win rate, and avg trade. Use when the user asks about "backtest", "how would strategy X have performed", "test this on…
tax-harvest
Walk an Indian retail trader through tax-loss harvesting on their Zerodha equity holdings — identify STCG/LTCG positions with losses, estimate tax savings under Indian capital-gains rules, and plan the sell-and-rebuy sequence while avoiding wash-sale equivalents. Use when the user asks about "tax harvesting", "tax…
sector-rotation
Analyze sector exposure in an Indian equity portfolio — which sectors the user is overweight/underweight vs NIFTY benchmarks, how yesterday's FII/DII flows align with current holdings, and what the concentration numbers actually say. Use when the user asks about "sector exposure", "sector rotation", "am I too…
trade-check
Run a pre-flight check before placing an equity order on Zerodha Kite — current price, margin required, portfolio concentration impact, existing exposure, and stop-loss suggestion. Use when the user says "should I buy X", "pre-trade check on Y", "can I afford Z quantity of ABC", "check before I place order", or asks…