Enforces pre-trade risk checks: stop placement, risk per trade, reward:risk, position size, portfolio heat, max positions, duplicate exposure, daily loss limit, losing-streak pause, drawdown circuit breaker, and kill switch. Issues short-lived approvals for the trading-broker skill. Also shows a live risk dashboard.
Ships in trading-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
trading-risk)"No plan, no trade" made mechanical. The gate enforces the user's own limits from config.risk.
python3 scripts/gate.py check --symbol AAPL --side long --entry 195 --stop 188 --target 212 --qty 70 \
--setup "VCP breakout" --thesis "3 contractions, volume dry-up; invalid below 188"
python3 scripts/gate.py check --symbol AAPL --entry 195 --stop 188 --target 212 --auto-size
python3 scripts/gate.py check --plan 12 # planned trade saved by trading-plan --save
python3 scripts/gate.py status # heat, today's P&L, streak, drawdown, kill switch
Exit code 0 = PASS / PASS_WITH_WARNINGS (approval issued), 3 = FAIL.
| check | rule (config key) |
|---|---|
| kill_switch_off | ~/.trading-skills/KILL_SWITCH absent |
| stop_defined | stop below entry (long) / above (short) |
| risk_per_trade | risk <= risk_per_trade_pct |
| reward_risk | (target-entry)/(entry-stop) >= min_reward_risk (warn if no target) |
| position_size | notional <= max_position_pct of equity |
| portfolio_heat | open risk + this trade <= max_open_risk_pct |
| max_positions | open positions < max_open_positions |
| daily_loss_limit | today's realized loss < max_daily_loss_pct |
| loss_streak | consecutive losses < max_consecutive_losses |
| max_drawdown | equity drawdown from journal peak < max_drawdown_pct |
| no_duplicate / plan_documented | warnings |
Equity and positions come from the configured broker (paper by default); open risk from the journal.
trading-setup set risk.<key> <value>.risk.approval_ttl_minutes, default 30) and covers one exact
symbol/side/qty/stop. Changing any of those needs a new check.scripts/_vendor/tradekit/__init__.py (opens in a new tab)scripts/_vendor/tradekit/alerts.py (opens in a new tab)scripts/_vendor/tradekit/analysis.py (opens in a new tab)scripts/_vendor/tradekit/backtest.py (opens in a new tab)scripts/_vendor/tradekit/brokers/__init__.py (opens in a new tab)scripts/_vendor/tradekit/brokers/_rest.py (opens in a new tab)scripts/_vendor/tradekit/brokers/base.py (opens in a new tab)scripts/_vendor/tradekit/brokers/dhan.py (opens in a new tab)scripts/_vendor/tradekit/brokers/fyers.py (opens in a new tab)scripts/_vendor/tradekit/brokers/groww.py (opens in a new tab)scripts/_vendor/tradekit/brokers/kite.py (opens in a new tab)scripts/_vendor/tradekit/brokers/paper.py (opens in a new tab)scripts/_vendor/tradekit/brokers/upstox.py (opens in a new tab)scripts/_vendor/tradekit/cli.py (opens in a new tab)scripts/_vendor/tradekit/config.py (opens in a new tab)scripts/_vendor/tradekit/data.py (opens in a new tab)scripts/_vendor/tradekit/disclosures.py (opens in a new tab)scripts/_vendor/tradekit/expr.py (opens in a new tab)scripts/_vendor/tradekit/feeds.py (opens in a new tab)scripts/_vendor/tradekit/frame.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
risk-management, trading, stop-loss, position-sizing, circuit-breaker
Other plugins' skills for the same job
/trading-skills:trading-riskfrom trading-skills
npx claudepluginhub reddygopalkrishna/trading-skills --plugin trading-skills21 skills in this plugin
/trading-alertsPrice alerts for any market - above or below a price, a trade's stop and target (long or short), a percent move from the previous close, a time on the exchange clock, the opening bell and minutes before the close, plus stop and target alerts for every open trade in the journal in one go. Works out each exchange's session from the data (NYSE, Nasdaq, NSE, BSE, LSE, TSE...) so holidays need no tables; each alert rings once; optional desktop notifications. Use when the user says "alert me when", "tell me if RELIANCE crosses 1400", "watch my stop", "remind me to close by 3:20", "is the market open", "when does NSE open", or right after a trade is planned or opened./trading-backtestBacktest trading strategies written as simple rules on one or many symbols in any market - next-bar-open execution with no look-ahead, commissions and slippage, ATR/percent/rule-based stops, R or percent targets, trailing stops, time exits, risk-based position sizing, max concurrent positions with ranking, benchmark comparison, in-sample vs out-of-sample split and a self-contained HTML report. Use when the user asks "does this strategy work", "backtest X", "test a moving-average crossover", "what if I bought when RSI was below 30", or wants to validate an idea before trading it.