agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what…
Use when defining or enforcing trading risk limits. Covers drawdown circuit breakers, exposure budgets, correlation risk, stop discipline, and pre-trade gates that prevent the worst decisions. Trigger on "set up risk rules for my account", "i'm in a drawdown, should i cut size",
Claude Code
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill risk-management --agent claude-code
Codex
$ npx skills add nimadorostkar/Claude-Skills-collection --skill risk-management -a codex -y
Cursor
$ npx skills add nimadorostkar/Claude-Skills-collection --skill risk-management -a cursor -y
Gemini CLI
$ npx skills add nimadorostkar/Claude-Skills-collection --skill risk-management -a gemini-cli -y
GitHub Copilot
$ npx skills add nimadorostkar/Claude-Skills-collection --skill risk-management -a github-copilot -y
OpenCode
$ npx skills add nimadorostkar/Claude-Skills-collection --skill risk-management -a opencode -y
Windsurf
$ npx skills add nimadorostkar/Claude-Skills-collection --skill risk-management -a windsurf -y
name: risk-management description: Use when defining or enforcing trading risk limits. Covers drawdown circuit breakers, exposure budgets, correlation risk, stop discipline, and pre-trade gates that prevent the worst decisions. Trigger on "set up risk rules for my account", "i'm in a drawdown, should i cut size", "when should i stop trading for the day". Do not use for sizing a single trade — see the position-sizing skill. metadata: category: finance version: 1.0.0 tags: [risk, drawdown, exposure, discipline, limits]
Define the limits that keep a losing period from becoming a terminal one, and enforce them mechanically — because the moment they matter most is the moment you will most want to override them.
1. **Set the limits when calm** — Maximum risk per trade, maximum total exposure, maximum drawdown before de-risking. Write them down. They must be decided before they are tested. 2. **Define the circuit breaker** — A drawdown level at which size is cut, and a deeper level at which trading stops entirely. This is the rule that prevents a bad month from becoming a career-ending one. 3. **Aggregate correlated risk** — Positions in the same sector, the same factor, or the same theme are one risk. Sum them. 4. **Gate every trade** — Check it against the limits before entry, mechanically. A checklist that is consulted after the position is on is not a gate. 5. **Honor the stop** — The stop is the risk. Moving it further away after entry converts a defined loss into an undefined one, and it is the single most common way accounts are destroyed. 6. **Review the rule, not the outcome** — A trade that followed the rules and lost was a good trade. A trade that broke the rules and won was a bad one, and it will be repeated.
**A drawdown circuit breaker with a defined de-risking schedule:**
@dataclass(frozen=True)
class RiskPolicy:
base_risk_pct: float = 0.01 # 1% per trade at full size
max_gross_exposure: float = 1.5 # 150% of equity, long + short
max_sector_exposure: float = 0.30
max_correlated_risk_pct: float = 0.04 # aggregate risk across correlated positions
def size_multiplier(drawdown_pct: float) -> float:
"""De-risk as the drawdown deepens. Mechanical, not discretionary."""
if drawdown_pct >= 0.20:
return 0.0 # STOP. No new positions. Review the strategy, not the market.
if drawdown_pct >= 0.15:
return 0.25
if drawdown_pct >= 0.10:
return 0.50
if drawdown_pct >= 0.05:
return 0.75
return 1.0
# Equity 100,000, high-water 120,000 -> drawdown 16.7% -> multiplier 0.25.
# Risk per trade is now 0.25% of 100,000 = $250, not the $1,000 it was at the peak.
# This is a 4x reduction in position size at the point where the strategy is
# demonstrably not working. It is not pessimism; it is arithmetic.**A pre-trade gate that is actually a gate:**
def pre_trade_check(trade: ProposedTrade, book: Portfolio, policy: RiskPolicy) -> GateResult:
failures = []
if trade.stop is None:
failures.append("BLOCK: no stop defined. Risk is undefined and unbounded.")
if trade.dollar_risk > book.equity * policy.base_risk_pct * size_multiplier(book.drawdown):
failures.append(
f"BLOCK: risk ${trade.dollar_risk:,.0f} exceeds the current limit "
f"(drawdown {book.drawdown:.1%} -> size multiplier "
f"{size_multiplier(book.drawdown):.2f})"
)
sector_after = book.sector_exposure(trade.sector) + trade.position_value / book.equity
if sector_after > policy.max_sector_exposure:
failures.append(
f"BLOCK: {trade.sector} exposure would reach {sector_after:.0%} "
f"(limit {policy.max_sector_exposure:.0%})"
)
# Correlated positions are one position.
correlated = book.positions_correlated_with(trade.symbol, threshold=0.7)
total_correlated_risk = sum(p.dollar_risk for p in correlated) + trade.dollar_risk
if total_correlated_risk > book.equity * policy.max_correlated_risk_pct:
failures.append(
f"BLOCK: aggregate risk across {len(correlated) + 1} correlated positions "
f"({', '.join(p.symbol for p in correlated)}) would reach "A curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory,…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling,…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.