/india-trading-skills:trading-disciplinefrom india-trading-skills
Enforces trading discipline for Indian retail traders: account-level loss limits (daily 2%, weekly 5%, monthly 10%), losing-streak cooldowns, and a pre-trade gate that blocks or warns before orders. Reviews performance by setup, weekday, hour, segment, and mistake.
Ships in india-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.
Most retail losses come from behaviour, not analysis: the oversized trade, the revenge trade after a loss, the fifth trade on a red day. This skill turns the rules into checks that run before money moves, and turns the journal into feedback afterwards.
# Can I trade today? (status GREEN / AMBER / RED + allowed risk for the next trade)
python3 scripts/discipline.py breaker trades.csv --capital 500000 [--as-of 2026-10-29]
# Pre-trade gate (writes nothing). Add --journal to fold in the breaker.
python3 scripts/discipline.py gate --capital 500000 --entry 1450 --stop 1410 --target 1550 --qty 120 \
--plan-written yes --minutes-since-last-loss 90 --regime risk-on --fno-ban no --asm-gsm no \
--event no --circuit-locked no --journal trades.csv
python3 scripts/discipline.py gate --segment options-buy --entry 140 --stop 85 --qty 75 --expiry-day yes ...
# Coaching review, and the latest ISO-week digest (or --week 2026-W43)
python3 scripts/discipline.py review trades.csv [--recent 10]
python3 scripts/discipline.py review trades.csv --week
# Only when the user asks to keep a record: run the gate and append one row to a CSV log
python3 scripts/discipline.py log --log decisions.csv --symbol INFY --action taken <gate flags>
Every command takes --json. Dates are IST; --as-of defaults to today in IST. Bad input prints
error: ... and exits 2.
Journal: the same CSV as ../position-sizing/scripts/risk.py journal
(date,symbol,side,entry,exit,stop,qty,charges, or a pnl column), plus optional exit_date,
time (HH:MM entry time), setup (or tag), mistake (several separated by ;), segment
(equity / fno / intraday) and notes. A row with a blank exit and blank pnl is an open trade:
it is left out of realised statistics and listed separately, and its stop risk counts against the
breaker's remaining room. A zero-P&L trade is a breakeven, not a loss.
| Rule (default, flag) | Trips | Releases | Why |
|---|---|---|---|
Daily loss 2% (--daily-pct) | RED | Next weekday | Two full 1% losses; after that, decisions get worse |
Weekly loss 5% (--weekly-pct, Mon–Sun) | RED | Next Monday | Stops a bad day turning into a bad month |
Monthly loss 10% (--monthly-pct) | RED | 1st of next month | Recovering 10% needs 11%; recovering 30% needs 43% |
3 losses in a row, latest today (--stop-streak) | RED | Next weekday | Tilt: the next trade is usually the worst one |
| 3+ streak still open from an earlier day | AMBER | A win | First trade back should be your best setup |
5 losses in a row (--reduce-streak) | AMBER, size ×0.5 | After 5 more trades (--reduce-trades) | Shrink until the edge reappears |
| Any period ≥ 50% of its limit | AMBER | — | Early warning |
Limits use net realised P&L for the IST day, ISO week and calendar month. Breakevens neither
extend nor break a streak. Allowed risk for the next trade = normal risk (--risk-pct, 1%) × the
size multiplier, capped so that a stop-out (plus stop risk on open trades) cannot breach any limit.
Holidays are not modelled; "next weekday" may be an NSE holiday (see indian-market-structure).
Any BLOCK → BLOCK; otherwise any WARN → PASS-WITH-WARNINGS; else PASS. Unsupplied yes/no flags are skipped, except where noted.
| Check | BLOCK when | WARN when |
|---|---|---|
| Stop-loss | Missing, or on the wrong side | Option buy with no premium stop (full premium = risk) |
| Rupee risk | Unknown (no qty/capital), or > --risk-pct-limit (1%) | — |
| Target | Wrong side, or R:R < 1 | Missing, or R:R < 1.5 |
| Written plan | --plan-written no | Not stated |
| Revenge window | < 30 min since last loss (--revenge-minutes) | Not stated but today's last journal trade was a loss |
Regime (label from market-regime) | crash / panic / no-trade, for longs | Trading against risk-off or risk-on; sideways / volatile; unknown label |
| F&O ban | Fresh F&O position in a ban-period stock | Cash trade in a ban stock; F&O with ban status unknown |
ASM / GSM / T2T (--asm-gsm) | Intraday (T2T/GSM can't be squared off) | Delivery |
Results / board meeting in window (--event; event-calendar window answers it) | — | Gap risk; IV crush for options |
Circuit-locked (--circuit-locked) | Always | — |
| Expiry day (Tue NIFTY, Thu SENSEX) | — | Option buy on expiry; option sell (extra ELM). Auto-flagged on Tue/Thu if not stated |
MIS cut-off (--segment intraday, --time) | At or after 15:00 IST (auto square-off ~15:15–15:20) | Before 09:15 |
Circuit breaker (--journal) | RED, or trade risk > breaker's allowed risk | AMBER |
--segment is equity, intraday, futures, options-buy or options-sell. --qty is the total quantity
(lots × lot size). Add --charges (₹) from trading-costs to include costs in the risk.
india-market-analyst: when a trade idea reaches a concrete entry/stop/target, run the gate
and show its verdict with the plan. Fetch ban list, ASM/GSM status and results dates first where
a data source allows; otherwise ask the user rather than assuming "no".broker-integration: the gate runs before step 3 of the order protocol (the ticket).
BLOCK → do not draft a ticket; explain the blocks. PASS-WITH-WARNINGS → list each warning on the
ticket and still wait for an explicit "yes". PASS → the normal ticket and confirmation still apply.
The gate never places, modifies or cancels orders.log only when the user asks to keep a decision record. It appends one
row and refuses a file whose header is not a decision log.position-sizing answers how many shares for a given risk. This skill answers whether to trade
at all, and how much risk is allowed right now, given today's losses, streaks and the checklist.
Use the breaker's allowed risk as the --risk-pct input to risk.py size, then gate the result.
review reports win rate, average win/loss, profit factor, expectancy (₹ and R), max drawdown and
longest losing streak, then breaks results down by setup, entry weekday, entry hour, segment, F&O
vs cash, mistakes ranked by ₹ lost, clean vs mistake trades, winner vs loser holding days (needs
exit_date), and the last N trades vs the N before. Coach notes name the best and worst setup, the
costliest mistake and any trend. --week summarises one ISO week: trades closed, best and worst,
mistakes, setup mix and the previous week's net.
F&O context: SEBI's FY25 study found about 91% of individual F&O traders lost money; the FY26 update (press release 50/2026) put it near 88%. If a user's own F&O rows are net negative while cash trades are positive, say so plainly and suggest pausing F&O until the cash edge is proven.
Circuit breaker: AMBER (as of Tue 27 Oct 2026 IST, capital ₹5,00,000)
Allowed risk on next trade: ₹2,500 (0.50%) • After a 5+ loss streak, risk is cut to 50% for 3 more trades
Pre-trade gate: BLOCK [BLOCK] revenge-window Only 10 min since the last loss ...
Limits: every India flag is supplied by the user or a data tool, so the gate is only as good as those answers. Regime labels are matched by keyword. Fewer than 30 trades make review numbers noisy.
Educational discipline tool, not investment advice. The rules are defaults; the decision stays yours.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub xdhruv/claude-trading-skills-india-mv --plugin india-trading-skills2 plugins ship this exact skill · first indexed Nov 14, 2026
36 skills in this plugin
/backtest-labBacktests rule-based swing ideas on NSE/BSE daily bars with Indian frictions built in: decide on
the close and fill at the next open, gap-through stops, slippage, exact per-trade charges by
segment and broker (STT, stamp duty, GST, DP), whole shares or lots, circuit-band no-fills,
futures-only shorts and an optional STCG/LTCG estimate. Six built-in strategies; CAGR vs
buy-and-hold, drawdown, Sharpe/Sortino, profit factor, expectancy in ₹ and R; parameter sweeps
with a plateau-or-spike read, walk-forward and Monte Carlo. backtest.py, stdlib only, offline.
Use when the user asks: "backtest this strategy", "would a 20/50 crossover have worked on X",
"is this edge real or curve-fit", "optimise my parameters", "walk-forward test", "Monte Carlo my
trades", "what drawdown should I expect", "do charges kill this idea", "does a NIFTY 200-DMA
filter help", or before putting real money behind any mechanical rule.
/breakout-plannerStage-2 breakout setups on NSE/BSE stocks: a trend-template check (rising 200 DMA, 50>150>200
stack, distance from 52-week high/low, relative strength vs NIFTY), base detection (volatility
contraction with successively tighter pullbacks, or a flat base) with pivot, depth, duration,
volume dry-up and a grade, then an order-ready plan: trigger, chase limit, capped stop, size,
Indian charges, R targets, GTT/SL templates, circuit-band and NSE tick-size checks. breakout.py
scans a folder of CSVs or yfinance symbols and ranks them, offline-capable.
Use when the user asks: "is X in a Stage 2 uptrend", "find VCP setups", "where is the pivot on X",
"plan a breakout trade in X", "breakout buy point and stop", "scan these stocks for breakouts",
"Minervini trend template for NSE stocks", "how do I place a GTT for a breakout", or any question
about buying stocks as they clear a base.
Other plugins' skills for the same job