Agent skill

Strategy Framework

by agiprolabs in agiprolabs/claude-trading-skills

Standardized template for defining trading strategies with entry rules, exit rules, position sizing, risk parameters, and performance criteria

MITAuto-check passedBusiness, Finance & HR

Install Strategy Framework

skills CLI
$ npx skills add agiprolabs/claude-trading-skills --skill strategy-framework -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install agiprolabs/claude-trading-skills strategy-framework --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/agiprolabs/claude-trading-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/strategy-framework .claude/skills/strategy-framework && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
strategy-framework
GitHub stars
410
Token cost
~2.6k tokens
SKILL.md length
1,026 words
Files
5 (incl. scripts, references)
Skills in repo
68
Repo updated
First seen
Licence
MIT

At a glance

Standardized template for defining trading strategies with entry rules, exit rules, position sizing, risk parameters, and performance criteria

  • Works in 8 steps: Hypothesis → Definition → Backtest → …
  • Tasks that involve Trading and backtesting
  • SKILL.md covers Why a Strategy Framework Matters, Strategy Definition Template, Strategy Lifecycle and Strategy Evaluation Criteria, plus 4 more sections
  • Runs Python scripts from its folder

What it does

Strategy Framework is an agent skill from agiprolabs/claude-trading-skills. Standardized template for defining trading strategies with entry rules, exit rules, position sizing, risk parameters, and performance criteria

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts and reference files (for example `references/strategy_template.md`, `references/strategy_types.md` and `scripts/define_strategy.py`).

It sits in Business, Finance & HR, covering Trading and backtesting. The repository describes itself as: 68 trading, DeFi, and quantitative finance Agent Skills. Works with Claude Code, Cursor, Codex, Gemini CLI, and 30+ other tools. The licence is MIT.

When your agent uses it

  • Tasks that involve Trading and backtesting

Example prompts

  • “/strategy-framework”

Requirements

  • Python 3

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Hypothesis
  2. Definition
  3. Backtest
  4. Paper Trade
  5. Small Live
  6. Scale
  7. Monitor
  8. Retire

What it can do on your machine

Read from SKILL.md and the folder at commit 981e1d7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Strategy Framework loads about 2.6k tokens when it runs, and up to ~6.2k if it reads all its reference files. Until then it costs about 40 tokens; SKILL.md has 1,026 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~40
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from agiprolabs/claude-trading-skills at commit 981e1d7, republished under its MIT licence (© agiprolabs). 1,026 words, ~2,611 tokens.

Download SKILL.mdSave it as .claude/skills/strategy-framework/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
strategy-framework
description
Standardized template for defining trading strategies with entry rules, exit rules, position sizing, risk parameters, and performance criteria

Strategy Framework

A standardized system for defining, documenting, testing, and managing trading strategies. This skill provides templates and tools that enforce discipline, enable reproducibility, and make strategies testable.

Why a Strategy Framework Matters

Trading without a written strategy framework leads to:

  • Inconsistency: ad-hoc decisions driven by emotion rather than rules
  • Untestability: vague ideas that cannot be backtested or evaluated
  • Scope creep: strategies that drift without version-controlled definitions
  • Unmanaged risk: missing stop losses, position limits, or drawdown halts

A strategy framework forces you to:

  1. State a falsifiable hypothesis about a market inefficiency
  2. Define precise, machine-testable entry and exit rules
  3. Specify position sizing and risk parameters before trading
  4. Set minimum performance criteria for continuation or retirement
  5. Track changes through versioned strategy documents

Strategy Definition Template

Every strategy must be documented using the standard template. The full copy-paste template is in references/strategy_template.md.

Core Sections

Identity

Name: SOL-EMA-Cross v1.0
Asset class: Solana tokens (top 50 by 24h volume)
Timeframe: Primary 1H, confirmation 4H
Style: Trend following

Edge Hypothesis: State what market inefficiency you are exploiting and why it exists.

Hypothesis: Solana mid-cap tokens exhibit momentum persistence
on the 1H timeframe due to retail herding behavior and low
institutional participation. EMA crossovers capture the
initiation of these trends.

Entry Rules: Specific, testable conditions combined with AND/OR logic.

python
def entry_signal(data: pd.DataFrame) -> bool:
    """All conditions must be True (AND logic)."""
    ema_cross = data["ema_12"] > data["ema_26"]  # EMA 12 crossed above 26
    ema_rising = data["ema_26"].diff(3) > 0       # 26 EMA trending up
    volume_ok = data["volume"] > data["vol_sma_20"] * 1.5  # Volume confirmation
    regime_ok = data["adx"] > 20                  # Trending regime
    return ema_cross & ema_rising & volume_ok & regime_ok

Exit Rules: Every strategy needs multiple exit mechanisms.

Exit TypeMethodParameters
Stop LossATR-based2.0 × ATR(14) below entry
Take ProfitRisk multiple3.0 × risk (3:1 R:R)
Trailing StopChandelier3.0 × ATR(14) from highest high
Time StopBar countClose if flat after 20 bars
Signal ExitEMA reversalEMA 12 crosses below EMA 26

Position Sizing: Method and parameters. See the position-sizing skill for details.

python
risk_per_trade = 0.02        # 2% of portfolio
stop_distance_pct = 0.05     # 5% from entry (ATR-derived)
position_size = (portfolio * risk_per_trade) / stop_distance_pct

Risk Parameters: Portfolio-level guardrails. See the risk-management skill.

Max concurrent positions: 5
Risk per trade: 2% of portfolio
Daily loss limit: 5% of portfolio
Max drawdown halt: 15% — stop trading, review strategy
Correlated exposure limit: 10% (e.g., meme tokens combined)

Filters: Conditions that prevent entry even if signals fire.

python
def filters_pass(token: dict, market: dict) -> bool:
    """All filters must pass before entry is allowed."""
    volume_ok = token["volume_24h"] > 500_000      # Min $500K volume
    liquidity_ok = token["liquidity"] > 100_000    # Min $100K liquidity
    age_ok = token["age_days"] > 7                 # Not brand new
    holders_ok = token["holder_count"] > 500       # Sufficient distribution
    regime_ok = market["regime"] != "crisis"       # No crisis regime
    return all([volume_ok, liquidity_ok, age_ok, holders_ok, regime_ok])

Performance Criteria: When to continue, review, or retire.

Continue: Sharpe > 1.0, PF > 1.5, Win Rate > 40%, MDD < 20%
Review:   Any metric degrades 25% from baseline
Retire:   Rolling 30-day Sharpe < 0, or 3 consecutive losing months

Strategy Lifecycle

1. Hypothesis

Identify a market inefficiency and explain why it exists and why it might persist.

Good hypothesis: "New PumpFun tokens that reach 80+ SOL in bonding curve within 10 minutes have a 65% probability of graduating to Raydium, creating a predictable price spike at graduation."

Bad hypothesis: "SOL will go up." (Not specific, not testable, no edge identified.)

2. Definition

Write the full strategy document using the template in references/strategy_template.md. Every field must be filled. If you cannot fill a field, the strategy is not ready.

3. Backtest

Test on historical data using vectorbt or equivalent. Requirements:

  • Minimum 100 trades in the test period
  • Use walk-forward validation (train on 70%, test on 30%)
  • Account for slippage and fees (see slippage-modeling skill)
  • Report both in-sample and out-of-sample metrics
4. Paper Trade

Run the strategy in simulation for at least 2 weeks (or 30 trades, whichever is longer).

  • Compare paper results to backtest expectations
  • If results differ by more than 25%, investigate before proceeding
5. Small Live

Trade with minimum viable size (enough to cover fees, small enough to be inconsequential).

  • Run for at least 30 trades
  • Compare to paper trade results
6. Scale

If small-live metrics match expectations (within 25% of backtest):

  • Increase position size gradually (25% increments per week)
  • Monitor metrics continuously
7. Monitor

Ongoing performance tracking:

  • Daily: P&L, trade count, win rate
  • Weekly: Sharpe ratio, profit factor, drawdown
  • Monthly: Full strategy review against performance criteria
8. Retire

Stop using a strategy when:

  • Rolling 30-day Sharpe drops below 0
  • Three consecutive losing months
  • Market regime permanently shifts (e.g., regulatory change)
  • A better strategy replaces it for the same edge

Strategy Evaluation Criteria

Minimum thresholds before a strategy should be traded live:

MetricTrend FollowingMean ReversionScalping
Min Trades100100500
Sharpe (OOS)> 1.0> 1.0> 1.5
Profit Factor> 1.5> 1.5> 1.3
Max Drawdown< 20%< 15%< 10%
Win Rate> 35%> 55%> 55%
Avg Win/Avg Loss> 2.0> 1.0> 1.0

Strategy Types for Crypto

Detailed descriptions of each strategy type are in references/strategy_types.md.

Momentum / Trend Following
  • Edge: Price trends persist due to behavioral biases and information asymmetry
  • Indicators: EMA crossovers, SuperTrend, ADX, MACD
  • Win rate: 35-45%, relies on large winners
  • Best regime: Trending markets with moderate volatility
Show full SKILL.md (398 more words)Show less
Mean Reversion
  • Edge: Price oscillates around equilibrium due to overreaction
  • Indicators: RSI, Bollinger Bands, z-score, VWAP deviation
  • Win rate: 55-65%, relies on high win rate with smaller gains
  • Best regime: Ranging markets with low-moderate volatility
Breakout
  • Edge: Compressed volatility leads to directional expansion
  • Indicators: Bollinger Band squeeze, Donchian channels, volume breakout
  • Win rate: 30-40%, relies on catching large moves
  • Best regime: Transitioning from low to high volatility
Copy Trading / Wallet Following
  • Edge: Skilled wallets have informational or analytical advantages
  • Indicators: Wallet PnL history, trade frequency, token selection
  • Win rate: Depends on followed wallet quality
  • Best regime: Any (depends on followed wallet's strategy)
PumpFun Sniping
  • Edge: Predictable price dynamics around token creation and graduation
  • Strategies: Creation snipe, volume confirmation, graduation play
  • Win rate: Highly variable (20-60% depending on approach)
  • Best regime: High retail activity periods
Arbitrage
  • Edge: Price discrepancies across DEXs or between spot and perpetuals
  • Indicators: Price feeds from multiple venues, funding rates
  • Win rate: > 80% when executed correctly
  • Best regime: High volatility, fragmented liquidity
Market Making
  • Edge: Capturing bid-ask spread while managing inventory risk
  • Indicators: Order book depth, volatility, inventory position
  • Win rate: > 60%, relies on volume and spread capture
  • Best regime: Stable markets with consistent volume

Common Strategy Mistakes

  1. No written rules: Trading on intuition, unable to backtest or reproduce
  2. Curve fitting: Optimizing parameters until backtest looks perfect, fails live
  3. Missing stops: "I'll exit when it feels right" leads to catastrophic losses
  4. Ignoring regime: Using a trend strategy in a ranging market (or vice versa)
  5. Survivorship bias: Only backtesting tokens that still exist
  6. Lookahead bias: Using future information in backtest signals
  7. Ignoring costs: Not accounting for slippage, fees, and market impact
  8. Over-trading: Entering on marginal signals to "stay active"
  9. Strategy hopping: Abandoning strategies after normal losing streaks
  10. No retirement plan: Continuing to trade a broken strategy out of attachment

Integration with Other Skills

SkillIntegration
vectorbtBacktest strategy definitions programmatically
pandas-taCompute technical indicators for entry/exit signals
regime-detectionMarket regime filters for strategy activation
exit-strategiesDetailed exit rule implementation
position-sizingPosition size calculation methods
risk-managementPortfolio-level risk parameter enforcement
slippage-modelingRealistic execution cost estimation
feature-engineeringML feature computation from strategy signals

Files

References
  • references/strategy_template.md — Complete copy-paste strategy definition template
  • references/strategy_types.md — Detailed guide to each strategy type with parameters and examples
Scripts
  • scripts/define_strategy.py — Interactive strategy definition tool with --demo mode
  • scripts/strategy_scorecard.py — Strategy evaluation scorecard with GO/REVIEW/NO-GO recommendations

© agiprolabs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts, references) in skills/strategy-framework of agiprolabs/claude-trading-skills.

  • SKILL.md
  • references/strategy_template.md
  • references/strategy_types.md
  • scripts/define_strategy.py
  • scripts/strategy_scorecard.py

Open the folder on GitHubat commit 981e1d7

Compare with similar skills

Strategy Framework next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Strategy Framework compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Strategy Framework this skillagiprolabs/claude-trading-skills410—~2.6kAutomated safety check: PassMIT
Tushare Datazillionare/zillionare3192 repos~2.3kAutomated safety check: PassNone
Tradingview MCPatilaahmettaner/tradingview-mcp5k—~1.3kAutomated safety check: PassMIT
Digital Oraclekomako-workshop/digital-oracle870—~5.9kAutomated safety check: PassMIT
Fintoolsecond-state/fintool3161 repos~5.9kAutomated safety check: PassNone
Polyclawchainstacklabs/polyclaw3601 repos~2kAutomated safety check: PassApache-2.0

Similar skills

  • Tushare Data

    zillionare/zillionare

    面向中文自然语言的 Tushare 数据研究技能。用于把“看看这只股票最近怎么样”“帮我查财报趋势”“最近哪个板块最强”“北向资金在买什么”“给我导出一份行情数据”这类请求,转成可执行的数据获取、清洗、对比、筛选、导出与简要分析流程。适用于 A 股、指数、ETF/基金、财务、估值、资金流、公告新闻、板块概念与宏观数据等研究场景。

    319 GitHub starsUsed in 2 repos~2.3k tokens
    Business, Finance & HRAuto-check passed
  • Tradingview MCP

    atilaahmettaner/tradingview-mcp

    AI Trading Intelligence — live prices, 30+ technical indicators, backtesting (6 strategies), walk-forward overfitting detection, trade logs, equity curves, licensed news sentiment (Marketaux), and…

    5k GitHub stars~1.3k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Digital Oracle

    komako-workshop/digital-oracle

    Answer prediction questions using market trading data, not opinions.

    870 GitHub stars~5.9k tokensUpdated 2 mo ago
    Business, Finance & HRAuto-check passed
  • Fintool

    second-state/fintool

    Financial trading CLIs — spot and perp trading on Hyperliquid, Binance, Coinbase, OKX.

    316 GitHub starsUsed in 1 repo~5.9k tokens
    Business, Finance & HRAuto-check passed
  • Polyclaw

    chainstacklabs/polyclaw

    Trade on Polymarket via split + CLOB execution. An agent skill from chainstacklabs/polyclaw.

    360 GitHub starsUsed in 1 repo~2k tokens
    Business, Finance & HRAuto-check passed
  • Markdown

    facioquo/stock-indicators-dotnet

    Format and lint Markdown in this repository against GitHub Flavored Markdown and its markdownlint-cli2 configuration — headers, lists, code fences, callouts (VitePress containers on docs-site pages…

    1.2k GitHub stars~812 tokensUpdated today
    Business, Finance & HRAuto-check passed

More from agiprolabs/claude-trading-skills

All 68 skills in this repo
  • Backtrader

    agiprolabs/claude-trading-skills

    Event-driven backtesting with bar-by-bar execution, complex order types, multiple analyzers, and custom indicators

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Birdeye API

    agiprolabs/claude-trading-skills

    Solana token market data via Birdeye — prices, OHLCV, trades, token metadata, security checks, and trader activity

    410 GitHub stars~1.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Coingecko API

    agiprolabs/claude-trading-skills

    Broad crypto market data from CoinGecko covering 13,000+ tokens.

    410 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Cointegration Analysis

    agiprolabs/claude-trading-skills

    Cointegration testing for pairs trading using Engle-Granger, Johansen, and rolling stability analysis

    410 GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Copy Trading

    agiprolabs/claude-trading-skills

    Wallet evaluation, monitoring, and copy-trade strategy design for Solana DEX trading

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Correlation Analysis

    agiprolabs/claude-trading-skills

    Cross-asset correlation analysis including rolling correlation, hierarchical clustering, tail dependence, and regime-dependent correlation

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Strategy Framework

What does Strategy Framework do?

Standardized template for defining trading strategies with entry rules, exit rules, position sizing, risk parameters, and performance criteria. Strategy Framework is an agent skill from agiprolabs/claude-trading-skills.

When should I use Strategy Framework?

Strategy Framework fits situations like: tasks that involve Trading and backtesting.

How do I install Strategy Framework in Claude Code?

Run `npx skills add agiprolabs/claude-trading-skills --skill strategy-framework -a claude-code`. Or copy the skill folder (skills/strategy-framework in agiprolabs/claude-trading-skills) into .claude/skills/strategy-framework in your project. Claude Code loads it when a task matches its description.

How do I install Strategy Framework in Codex?

Run `npx skills add agiprolabs/claude-trading-skills --skill strategy-framework -a codex`. Or copy the skill folder (skills/strategy-framework in agiprolabs/claude-trading-skills) into .agents/skills/strategy-framework in your project. Codex loads it when a task matches its description.

Can I use Strategy Framework in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add agiprolabs/claude-trading-skills --skill strategy-framework -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/strategy-framework, .gemini/skills/strategy-framework, .github/skills/strategy-framework and .opencode/skills/strategy-framework in your project.

What does Strategy Framework need to run?

Going by SKILL.md and its folder, Strategy Framework needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Strategy Framework access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Strategy Framework safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Strategy Framework use?

Strategy Framework is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Strategy Framework use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.6k tokens, read only when the agent opens those files.

What are the alternatives to Strategy Framework?

Skills that share tags, products or a category with Strategy Framework: Tushare Data (zillionare/zillionare, 319 stars), Tradingview MCP (atilaahmettaner/tradingview-mcp, 5k stars), Digital Oracle (komako-workshop/digital-oracle, 870 stars) and Fintool (second-state/fintool, 316 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Strategy Framework?

agiprolabs (a GitHub user) maintains it in agiprolabs/claude-trading-skills, which has 410 GitHub stars. The repository holds 68 skills in this directory. The repository was last updated on September 3, 2026.

Source: agiprolabs/claude-trading-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.