Standardized template for defining trading strategies with entry rules, exit rules, position sizing, risk parameters, and performance criteria
npx skills add https://github.com/agiprolabs/claude-trading-skills --skill 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.
Trading without a written strategy framework leads to:
A strategy framework forces you to:
Every strategy must be documented using the standard template. The full copy-paste template is in references/strategy_template.md.
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.
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 Type | Method | Parameters |
|-----------|--------|------------|
| Stop Loss | ATR-based | 2.0 × ATR(14) below entry |
| Take Profit | Risk multiple | 3.0 × risk (3:1 R:R) |
| Trailing Stop | Chandelier | 3.0 × ATR(14) from highest high |
| Time Stop | Bar count | Close if flat after 20 bars |
| Signal Exit | EMA reversal | EMA 12 crosses below EMA 26 |
Position Sizing: Method and parameters. See the position-sizing skill for details.
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.
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
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.)
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.
Test on historical data using vectorbt or equivalent. Requirements:
slippage-modeling skill)Run the strategy in simulation for at least 2 weeks (or 30 trades, whichever is longer).
Trade with minimum viable size (enough to cover fees, small enough to be inconsequential).
If small-live metrics match expectations (within 25% of backtest):
Ongoing performance tracking:
Stop using a strategy when:
Minimum thresholds before a strategy should be traded live:
| Metric | Trend Following | Mean Reversion | Scalping |
|--------|----------------|----------------|----------|
| Min Trades | 100 | 100 | 500 |
| 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 |
Detailed descriptions of each strategy type are in references/strategy_types.md.
10. No retirement plan: Continuing to trade a broken strategy out of attachment
| Skill | Integration |
|-------|------------|
| vectorbt | Backtest strategy definitions programmatically |
| pandas-ta | Compute technical indicators for entry/exit signals |
| regime-detection | Market regime filters for strategy activation |
| exit-strategies | Detailed exit rule implementation |
| position-sizing | Position size calculation methods |
| risk-management | Portfolio-level risk parameter enforcement |
| slippage-modeling | Realistic execution cost estimation |
| feature-engineering | ML feature computation from strategy signals |
references/strategy_template.md — Complete copy-paste strategy definition templatereferences/strategy_types.md — Detailed guide to each strategy type with parameters and examplesscripts/define_strategy.py — Interactive strategy definition tool with --demo modescripts/strategy_scorecard.py — Strategy evaluation scorecard with GO/REVIEW/NO-GO recommendationsPython library for accessing, analyzing, and extracting data from SEC EDGAR filings. Use when working with SEC filings, financial statements (income statement, balance sheet, cash flow), XBRL financial data, insider trading (Form 4), institutional holdings (13F), company financials, annual/quarterly reports (10-K, 10-Q), proxy statements (DEF 14A), 8-K current events, company screening by ticker/CIK/industry, multi-period financial analysis, or any SEC regulatory filings.
Use this skill when the user asks to list, create, inspect, update, disable, re-enable, or revoke AltLLM Portal API keys for external agents or applications. Do NOT use for wallet login, billing history, or payment links.
Use this skill when the user asks to log in or out with a wallet session, fetch a wallet sign-in challenge, verify an externally signed challenge, or troubleshoot AltLLM Portal wallet login for the local altllm CLI. Do NOT use for API key management, billing history, or payment links.
Use this umbrella skill when the request spans multiple AltLLM Portal CLI domains, or when you need to navigate the local altllm CLI in this repository across auth, API keys, billing history, NOWPayments payment links, and related x402 Portal top-up guidance.
Build with the ChainGPT Web3 AI developer platform. Full API/SDK reference and project scaffolding for: Web3 AI Chatbot & LLM, AI NFT Generator, Smart Contract Generator, Smart Contract Auditor, AI Crypto News, AgenticOS Twitter agents, and Solidity LLM. Use when building blockchain apps, Web3 chatbots, NFT tools, smart contract tools, crypto news feeds, AI agents, or integrating any ChainGPT API. Triggers: chaingpt, web3 ai, nft generator, smart contract audit, crypto news api, agenticos, solidity llm, cgpt, blockchain ai, token analytics.
TypeScript SDK for the Payment HTTP Authentication Scheme. Handles 402 Payment Required flows with Tempo, Stripe, and other payment methods. Use when integrating payments or mppx into a client or server application.
>- Guide for developing with near-api-js v7 - the JavaScript/TypeScript library for NEAR blockchain interaction. (3) calling smart contracts, (4) managing accounts and keys, (5) working with NEAR RPC API, (6) handling FT/NFT tokens on NEAR, (7) using NEAR cryptographic operations (KeyPair, signing), (8) converting between NEAR units (yocto, gas), (9) gasless/meta transactions with relayers, (10) NEP-413 message signing for authentication, (11) storage deposit management for FT contracts. Triggers on any NEAR blockchain development tasks.
TypeScript library for NEAR Protocol blockchain interaction. Use this skill when writing code that interacts with NEAR Protocol, including viewing contract data, calling contract methods, sending NEAR tokens, building transactions, creating type-safe contract wrappers, integrating wallets (Wallet Selector, HOT Connect), React hooks and providers (@near-kit/react), managing keys, testing with sandbox, meta-transactions (NEP-366), and message signing (NEP-413).
Take agiprolabs/strategy-framework from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.