Skip to content
SkillScript-led2,056 tokens in use

Drawdown Circuit Breaker

Reads local trade journal state and reports whether new trade risk is allowed today, using daily loss, losing-streak cooldown, weekly and monthly drawdown rules.

7,426 stars on the repository MIT Licensetradermonty/claude-trading-skills · skills/drawdown-circuit-breaker

Skill label

measured from its files

What installing Drawdown Circuit Breaker costs

54tokens idle
2,056tokens in use
3,569tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Script-led

Script-ledMixedModel-led

Most of this skill is scripts, so it behaves much the same whichever model runs it.

This describes the skill's structure, how much of it is scripts. It does not say how well it works. Scripts: scripts/_market_calendar.py, scripts/check_circuit_breaker.py.

Touches

shelldetectednetworkdetectedwrites filesdetected

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Good
  • Frontmatter8/15
  • Structure25/25
  • Examples9/15
  • Output10/15
  • Size15/15
  • Resources11/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Good
  • Runs shell commands−5

    does this on the machine, and the frontmatter does not say so

    SKILL.md, line 36
  • Reaches the network−10

    does this on the machine, and the frontmatter does not say so

    scripts/_market_calendar.py, line 108
  • Writes files−8

    does this on the machine, and the frontmatter does not say so

    scripts/check_circuit_breaker.py, line 795

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity100
  • Maintenance52
  • Community68
  • Maturity36
  • Momentum40

Drawdown Circuit Breaker scans the thesis YAML files kept by the trader-memory-core skill, adds up realized profit and loss for the day, week and month, counts consecutive losing closes, and returns one recommendation: TRADING_ALLOWED, COOLDOWN or HALTED.

Default limits are a 2 percent daily loss, a cooldown after two losing closes, a 5 percent weekly drawdown and an 8 percent monthly drawdown, all adjustable. It works from local files with no network access. The result is a recommendation and record, and it does not enforce blocks at a broker.

What You Get

  • A decision of TRADING_ALLOWED, COOLDOWN or HALTED with the triggered rules and their release times
  • Metrics for realized P&L today, week to date and month to date, and the current losing streak
  • A data quality field (OK, EMPTY_STATE or PARTIAL) with warnings for any thesis file that had to be skipped
  • A JSON decision file and a matching Markdown report

Common Use Cases

  • Checking before screening or sizing any new swing trade whether risk is allowed today
  • Seeing whether a cooldown is active after a losing trade
  • Reviewing whether weekly or monthly loss limits were breached
  • Gating a daily swing workflow before candidate generation

What Makes It Unique

It fails closed on bad data: a malformed, conflicting or duplicated thesis record produces a PARTIAL result and a HALTED recommendation until the state is repaired, while an empty state folder lets a new user start. Time boundaries follow the New York exchange calendar, and an explicit as-of value makes a run reproducible. Thresholds can be set on the command line or in a JSON file, with the command line taking priority.

Under The Hood

The agent runs a local Python script that reads YAML files from the state folder (usually state/theses), needs the pandas-market-calendars package for the exchange calendar, makes no network calls and needs no API keys. It writes a timestamped JSON file and, unless JSON-only is set, a Markdown file into an output folder, so it creates files on disk. The decision is advisory: nothing is sent to a broker.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers