Agent skill

Exit Strategies

by agiprolabs in agiprolabs/claude-trading-skills

Systematic exit rules, stop-loss methods, take-profit strategies, and trailing stop implementations for crypto trading

MITAuto-check passedBusiness, Finance & HR

Install Exit Strategies

skills CLI
$ npx skills add agiprolabs/claude-trading-skills --skill exit-strategies -a claude-code

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

GitHub CLI
$ gh skill install agiprolabs/claude-trading-skills exit-strategies --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/exit-strategies .claude/skills/exit-strategies && 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
exit-strategies
GitHub stars
410
Token cost
~2.3k tokens
SKILL.md length
740 words
Files
6 (incl. scripts, references)
Skills in repo
68
Repo updated
First seen
Licence
MIT

At a glance

Systematic exit rules, stop-loss methods, take-profit strategies, and trailing stop implementations for crypto trading

  • Works in 6 steps: Stop Loss — Risk Management Exits → Take Profit — Target Exits → Trailing Stop — Trend-Following Exits → …
  • Tasks that involve Trading and backtesting
  • SKILL.md covers Why Exits Matter, Exit Categories, PumpFun-Specific Exit Rules and Combining Exit Rules, plus 3 more sections
  • Runs Python scripts from its folder

What it does

Exit Strategies is an agent skill from agiprolabs/claude-trading-skills. Systematic exit rules, stop-loss methods, take-profit strategies, and trailing stop implementations for crypto trading

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts and reference files (for example `references/stop_loss_methods.md`, `references/take_profit_strategies.md` and `references/trailing_stops.md`).

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

  • “/exit-strategies”

Requirements

  • Python 3

Workflow steps

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

  1. Stop Loss — Risk Management Exits
  2. Take Profit — Target Exits
  3. Trailing Stop — Trend-Following Exits
  4. Time-Based Exits
  5. Signal-Based Exits
  6. Liquidity-Based Exits

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

Exit Strategies loads about 2.3k tokens when it runs, and up to ~8.2k if it reads all its reference files. Until then it costs about 34 tokens; SKILL.md has 740 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~34
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.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). 740 words, ~2,317 tokens.

Download SKILL.mdSave it as .claude/skills/exit-strategies/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
exit-strategies
description
Systematic exit rules, stop-loss methods, take-profit strategies, and trailing stop implementations for crypto trading

Exit Strategies

Entries are easy, exits are everything. A mediocre entry with a disciplined exit will outperform a perfect entry with no exit plan. This skill covers systematic, rule-based exit methods for crypto and Solana token trading.

Why Exits Matter

  • Entries determine if you participate. Exits determine how much you keep.
  • Most traders spend 90% of effort on entries and 10% on exits — invert this.
  • Without defined exits you rely on emotion, which guarantees inconsistency.
  • Every trade should have three exits defined before entry: stop loss, take profit, and trailing stop.

Exit Categories

1. Stop Loss — Risk Management Exits

Predefined price level where you close the position to cap downside.

MethodDescriptionBest For
Fixed percentageExit at entry − X%Simple setups, beginners
ATR-basedEntry − ATR(14) × multiplierVolatility-adaptive
Support levelBelow nearest swing lowTechnically defined risk
Maximum lossAbsolute SOL/USD capAccount protection

ATR-based stop (recommended default):

python
import pandas_ta as ta

atr = df.ta.atr(length=14)
stop_loss = entry_price - (atr.iloc[-1] * 2.0)  # 2x ATR below entry

Multiplier guide:

  • 1.5× — Tight. High win rate needed. Good for scalps.
  • 2.0× — Standard. Balances noise filtering with risk.
  • 3.0× — Wide. For swing trades in volatile conditions.

See references/stop_loss_methods.md for complete methodology.

2. Take Profit — Target Exits

Predefined levels where you lock in gains.

Fixed risk/reward targets:

python
risk = entry_price - stop_loss_price
tp_2r = entry_price + (risk * 2)  # 2:1 R:R
tp_3r = entry_price + (risk * 3)  # 3:1 R:R
tp_5r = entry_price + (risk * 5)  # 5:1 R:R

Scaled exit framework (recommended for meme/PumpFun tokens):

TrancheSizeTargetAction After
125%2× riskMove stop to breakeven
225%3–5× riskTrail remainder
325%5–10× riskTighten trail
425%Trailing stopMoonbag — let it ride

Market cap milestone exits:

For PumpFun and meme tokens where R:R ratios are less meaningful:

python
milestones = [
    {"mcap": 50_000,  "sell_pct": 0.25, "label": "Cover cost"},
    {"mcap": 100_000, "sell_pct": 0.25, "label": "Lock profit"},
    {"mcap": 500_000, "sell_pct": 0.25, "label": "Major profit"},
    # Hold 25% as moonbag with trailing stop
]

See references/take_profit_strategies.md for full methodology including Fibonacci extension targets and volume-based exits.

3. Trailing Stop — Trend-Following Exits

Dynamic stops that follow price upward but never move down.

Percentage trailing:

python
def percentage_trailing_stop(
    current_price: float,
    highest_since_entry: float,
    trail_pct: float = 0.10,
) -> tuple[float, bool]:
    """Return (stop_level, triggered)."""
    highest = max(highest_since_entry, current_price)
    stop = highest * (1 - trail_pct)
    return stop, current_price <= stop

ATR trailing (Chandelier Exit):

python
def chandelier_exit(
    highs: list[float],
    atr_value: float,
    multiplier: float = 2.5,
    lookback: int = 22,
) -> float:
    """Highest high over lookback minus ATR * multiplier."""
    highest_high = max(highs[-lookback:])
    return highest_high - (atr_value * multiplier)

EMA trailing:

python
# Exit when close < EMA for M consecutive bars
ema = df.ta.ema(length=20)
below_ema = df["close"] < ema
consecutive_below = below_ema.rolling(3).sum() == 3  # 3 bars below

Typical EMA periods: 10 (scalp), 20 (day trade), 50 (swing).

See references/trailing_stops.md for Parabolic SAR, SuperTrend, and step trailing.

4. Time-Based Exits

Exit if the trade hasn't moved in your favor within a defined window.

python
bars_since_entry = current_bar - entry_bar
if bars_since_entry > max_hold_bars and current_pnl <= 0:
    exit_reason = "time_stop"

Guidelines:

  • Scalp: 5–15 minutes
  • Day trade: 4–8 hours
  • Swing: 3–5 days
  • PumpFun snipe: 2–10 minutes (token-specific)

Time stops prevent capital from sitting in dead trades.

5. Signal-Based Exits

Exit when the indicator that generated the entry signal reverses.

python
# RSI reversal exit
rsi = df.ta.rsi(length=14)
if position == "long" and rsi.iloc[-1] > 70:
    exit_reason = "rsi_overbought"

# MACD crossover exit
macd = df.ta.macd()
if macd["MACDs_12_26_9"].iloc[-1] < macd["MACDh_12_26_9"].iloc[-1]:
    exit_reason = "macd_bearish_cross"

Signal exits work well when combined with trailing stops — the signal triggers tightening the trail rather than an immediate full exit.

6. Liquidity-Based Exits

Exit when volume or liquidity deteriorates, signaling reduced ability to exit cleanly.

python
recent_vol = df["volume"].rolling(10).mean().iloc[-1]
baseline_vol = df["volume"].rolling(50).mean().iloc[-1]

if recent_vol < baseline_vol * 0.3:  # Volume dropped to 30% of baseline
    exit_reason = "liquidity_deterioration"

Critical for low-cap Solana tokens where liquidity can evaporate rapidly.

PumpFun-Specific Exit Rules

PumpFun tokens have unique dynamics requiring specialized exit logic.

Pre-Graduation Exits

Tokens on the bonding curve before reaching 85 SOL fill:

python
bonding_fill_pct = current_fill_sol / 85.0

if bonding_fill_pct > 0.90:
    # Near graduation — decide: hold through or exit before
    # Graduation creates volatility spike, both up and down
    pass

if bonding_fill_pct < 0.50 and time_since_entry > 300:  # 5 min
    exit_reason = "stalled_bonding_curve"
Volume Decay Exits
python
buy_vol_1m = get_buy_volume(token, "1m")
buy_vol_5m = get_buy_volume(token, "5m") / 5  # Normalize to per-minute

if buy_vol_1m < buy_vol_5m * 0.3:
    exit_reason = "buy_volume_decay"
Show full SKILL.md (310 more words)Show less
Time Decay for PumpFun

Most PumpFun tokens that will succeed show momentum within the first few minutes:

TimeframeAction
0–2 minHold — too early to judge
2–5 minExit if no 2× from entry
5–10 minExit if no 3× from entry
10+ minShould be trailing, not hoping

Combining Exit Rules

A complete exit plan layers multiple rules. Here is a recommended template:

python
exit_plan = {
    "hard_stop": {
        "type": "fixed_percentage",
        "value": 0.20,  # -20% max loss
        "priority": 1,   # Checked first, always honored
    },
    "atr_stop": {
        "type": "atr_trailing",
        "multiplier": 2.5,
        "atr_length": 14,
        "priority": 2,
    },
    "take_profit": {
        "type": "scaled",
        "tranches": [
            {"at_rr": 2, "sell_pct": 0.25},
            {"at_rr": 4, "sell_pct": 0.25},
            {"at_rr": 8, "sell_pct": 0.25},
        ],
        "priority": 3,
    },
    "time_stop": {
        "type": "max_bars",
        "value": 50,
        "condition": "if_not_profitable",
        "priority": 4,
    },
}

Priority hierarchy: Hard stop > ATR trailing > Take profit > Time stop.

The hard stop is always active and never overridden. The ATR trailing stop activates after the first take-profit tranche fills. The time stop only fires if the trade is not yet profitable.

Common Exit Mistakes

MistakeProblemFix
No stop lossUnlimited downsideAlways define max loss before entry
Moving stops widerIncreases risk after the factNever move stops away from price
Not taking profitsWinners become losersUse scaled exits
All-or-nothing exitsLeaves money on the table or exits too earlyScale out in tranches
Round-number stopsCluster with other traders, get huntedOffset by small random amount
Too-tight stopsStopped out by normal volatilityUse ATR-based stops
Hoping instead of trailingGives back profitsActivate trail after first TP
Ignoring liquidityCannot exit at intended priceCheck spread and depth before sizing

Integration with Other Skills

  • position-sizing — Size the position based on the stop loss distance. position_size = (account_risk * account_balance) / (entry - stop_loss)
  • risk-management — Exits are the mechanism that enforces risk limits.
  • pandas-ta — Use ATR, EMA, RSI, MACD for signal-based and trailing exits.
  • slippage-modeling — Estimate execution cost of the exit to set realistic targets.
  • liquidity-analysis — Verify exit liquidity before entering a position.

Files

References
  • references/stop_loss_methods.md — Complete stop loss methodology and anti-patterns
  • references/take_profit_strategies.md — Scaled exits, R:R targets, Fibonacci extensions
  • references/trailing_stops.md — Trailing stop implementations and parameter guidance
Scripts
  • scripts/exit_simulator.py — Simulate and compare exit strategies on synthetic price data
  • scripts/stop_loss_calculator.py — Calculate stop levels, position sizes, and R:R targets

© 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 5 other files (scripts, references) in skills/exit-strategies of agiprolabs/claude-trading-skills.

  • SKILL.md
  • references/stop_loss_methods.md
  • references/take_profit_strategies.md
  • references/trailing_stops.md
  • scripts/exit_simulator.py
  • scripts/stop_loss_calculator.py

Open the folder on GitHubat commit 981e1d7

Compare with similar skills

Exit Strategies 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.

Exit Strategies compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Exit Strategies this skillagiprolabs/claude-trading-skills410—~2.3kAutomated safety check: PassMIT
Tushare Datazillionare/zillionare3222 repos~2.3kAutomated safety check: PassNone
Tradingview MCPatilaahmettaner/tradingview-mcp5k—~1.3kAutomated safety check: PassMIT
Digital Oraclekomako-workshop/digital-oracle878—~5.9kAutomated safety check: PassMIT
Polyclawchainstacklabs/polyclaw3591 repos~2kAutomated safety check: PassApache-2.0
Markdownfacioquo/stock-indicators-dotnet1.2k—~812Automated safety check: PassApache-2.0

Similar skills

  • Tushare Data

    zillionare/zillionare

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

    322 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 yesterday
    Business, Finance & HRAuto-check passed
  • Digital Oracle

    komako-workshop/digital-oracle

    Answer prediction questions using market trading data, not opinions.

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

    chainstacklabs/polyclaw

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

    359 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 yesterday
    Business, Finance & HRAuto-check passed
  • Openmobius Skill

    MobiusQuant/OpenMobius-skill

    Provides multi-school trading Q&A, chart/OHLCV analysis, annotation, and fresh-market workflows covering ICT/SMC, ChanLun, Wyckoff, Price Action, Order Flow, VSA, and Elliott Wave.

    697 GitHub stars~7.2k tokensUpdated 1 mo ago
    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 Exit Strategies

What does Exit Strategies do?

Systematic exit rules, stop-loss methods, take-profit strategies, and trailing stop implementations for crypto trading. Exit Strategies is an agent skill from agiprolabs/claude-trading-skills.

When should I use Exit Strategies?

Exit Strategies fits situations like: tasks that involve Trading and backtesting.

How do I install Exit Strategies in Claude Code?

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

How do I install Exit Strategies in Codex?

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

Can I use Exit Strategies 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 exit-strategies -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/exit-strategies, .gemini/skills/exit-strategies, .github/skills/exit-strategies and .opencode/skills/exit-strategies in your project.

What does Exit Strategies need to run?

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

Does Exit Strategies 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 Exit Strategies 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 Exit Strategies use?

Exit Strategies 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 Exit Strategies use?

About 2.3k tokens (SKILL.md is roughly 9.3k 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 5.9k tokens, read only when the agent opens those files.

What are the alternatives to Exit Strategies?

Skills that share tags, products or a category with Exit Strategies: Tushare Data (zillionare/zillionare, 322 stars), Tradingview MCP (atilaahmettaner/tradingview-mcp, 5k stars), Digital Oracle (komako-workshop/digital-oracle, 878 stars) and Polyclaw (chainstacklabs/polyclaw, 359 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Exit Strategies?

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.