Skip to content
Finance
Skill

/pre-trade-discipline-gate

Evaluate a local pre-trade checklist before manual order entry, blocking planless, oversized, revenge-risk, market-regime-blocked, or circuit-breaker-blocked entries while journaling the decision for trader-memory-core review.

From plugin
claude-trading-skills
6.9k74 skills2 agents2 commands

Claude Code

$ npx -y skills add tradermonty/claude-trading-skills --skill pre-trade-discipline-gate --agent claude-code

SKILL.md

pre-trade-discipline-gate.SKILL.md
name: pre-trade-discipline-gate
description: Evaluate a local pre-trade checklist before manual order entry, blocking planless, oversized, revenge-risk, market-regime-blocked, or circuit-breaker-blocked entries while journaling the decision for trader-memory-core review.

Pre-Trade Discipline Gate

Overview

Evaluate whether a planned manual order should proceed before it is placed at the broker. This skill reads a local checklist plus optional market-regime, circuit-breaker, and trader-memory-core artifacts. It produces a `pre_trade_discipline_decision` artifact and can link that artifact back to the related thesis without changing the thesis review schedule.

The gate is intentionally offline. It does not place orders, cancel orders, call a broker API, or fetch market data.

When to Use

  • Immediately before placing any manual entry order
  • When a candidate has passed chart validation and position sizing
  • After a recent loss, to avoid revenge trades during the cooldown window
  • When the workflow has an upstream `exposure_decision` and `circuit_breaker_decision`
  • When you want checklist adherence to be visible in later trader-memory-core reviews

Prerequisites

  • Python 3.9+
  • A local JSON or YAML answers file with candidate-level checklist answers
  • Optional trader-memory-core thesis state under `state/theses/`
  • Optional `exposure_decision` JSON from market-regime-daily / exposure-coach
  • Optional `circuit_breaker_decision` JSON from drawdown-circuit-breaker

Workflow

Step 1: Prepare the Checklist

Create a JSON or YAML file with candidate answers. Only actionable manual-order intents are gated. Watchlist and ignore intents are journaled as `NO_ACTIONABLE_ORDERS`.

{
  "candidates": [
    {
      "symbol": "AAPL",
      "thesis_id": "th_aapl_gm_20260703_0001",
      "order_intent": "ENTRY_READY",
      "entry_in_written_plan": true,
      "stop_predefined": true,
      "size_within_plan": true,
      "planned_risk_dollars": 500,
      "actual_risk_dollars": 500,
      "notes": "Entry matches the journaled breakout plan."
    }
  ]
}

Actionable intents are `ENTRY_READY`, `ACTIONABLE`, `ACTIONABLE_DAY1`, and `MANUAL_ORDER`. Non-actionable intents such as `WATCHLIST`, `DELAYED_EP_WATCH`, `PEAD_HANDOFF`, `IGNORE`, and `REJECTED` are recorded but do not create an order permission.

Provide both `planned_risk_dollars` and `actual_risk_dollars` for every actionable candidate. Use a finite, non-negative number or numeric string; zero is valid. Treat missing values, booleans, non-numeric strings, `NaN`, infinities, and negative values as `REVIEW_REQUIRED` inputs and review them before placing an order.

Step 2: Run the Gate

python3 skills/pre-trade-discipline-gate/scripts/check_pre_trade_discipline.py \
  --answers-file state/manual-entry-checklist.json \
  --state-dir state/theses \
  --market-regime-decision reports/exposure_decision_latest.json \
  --circuit-breaker-decision reports/circuit_breaker_decision_latest.json \
  --output-dir reports/pre-trade-discipline \
  --journal-dir state/journal/pre-trade-discipline

Set `--as-of` for deterministic testing or backfills:

python3 skills/pre-trade-discipline-gate/scripts/check_pre_trade_discipline.py \
  --answers-file state/manual-entry-checklist.json \
  --as-of 2026-07-03T12:00:00-04:00

Step 3: Interpret the Decision

| Decision | Meaning | |---|---| | `GO` | All actionable manual-order candidates passed the checklist and upstream gates | | `REVIEW_REQUIRED` | Inputs are missing, unknown, or journaling failed; an approved-rule acknowledgement is missing or records an exception; or the approved-rule ledger could not be read. Do not place orders until reviewed | | `NO_GO` | At least one actionable candidate violated a discipline rule | | `NO_ACTIONABLE_ORDERS` | The file contains no actionable manual orders; nothing should be placed |

By default the CLI exits `0` for every valid decision and exits `1` only for input or runtime errors. Use `--fail-on-non-go` when a shell pipeline should return `2` for any non-`GO` decision.

Approved Operating Rules (optional)

Rules a human approved in the monthly review can be carried into the pre-trade check through a local ledger. The gate never evaluates a rule against a trade; it lists each applicable rule and requires a recorded acknowledgement. The acknowledgement is recorded, not verified.

Ledger lifecycle

The ledger is a local JSON file, `state/rules/approved_rules.json` by default. It is a single-user file: writes are atomic, but concurrent writers are not supported. Manage it with `scripts/manage_approved_rules.py`:

# Activate approved rules from a monthly rule-changes artifact (both artifact shapes are accepted)
python3 skills/pre-trade-discipline-gate/scripts/manage_approved_rules.py activate \
  --rule-changes reports/06_rule_changes_for_next_month.yaml \
  --effective-date 2026-06-01 --review-after 2026-06-30 --confirm-activation

# Also activate the postmortem-driven trade_rule_changes (opt-in; needed when the coach step was skipped)
python3 skills/pre-trade-discipline-gate/scripts/manage_approved_rules.py activate \
  --rule-changes reports/06_rule_changes_for_next_month.yaml \
  --effective-date 2026-06-01 --review-after 2026-06-30 \
  --include-trade-rule-changes --source-review-id monthly_2026-05 --confirm-activation

python3 skills/pre-trade-discipline-gate/scripts/manage_approved_rules.py list --as-of 2026-06-15
python3 skills/pre-trade-discipline-gate/scripts/manage_approved_rules.py extend \
  --rule-id rule_3f9a1c2b7d10 --review-after 2026-08-31 --reason "keep another month"
python3 skills/pre-trade-discipline-gate/scripts/manage_approved_rules.py retire \
  --rule-id rule_3f9a1c2b7d10 --reason "no longer relevant"
python3 skills/pre-trade-discipline-gate/scripts/manage_approved_rules.py restore \
  --rule-id rule_3f9a1c2b7d10 --reason "retired by mistake"
python3 skills/pre-trade-disciplin
Read more
@tradermonty
Ships withclaude-trading-skills

Data handling: Privacy policy · Security policy Claude Trading Skills started as a personal project to use AI to improve my own trading process. Claude Trading Skills is a Claude Skills-based trading workflow toolkit for time-constrained individual investors.

6.9k74 skills2 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
6.9k
Star history of tradermonty/claude-trading-skills on GitHub, a chart by star-history.com

Other skills on claude-trading-skills.

More skills from other plugins.

ccxt-cli

ccxt-cli

CCXT command-line interface (ccxt-cli) for interacting with 100+ cryptocurrency exchanges directly from the terminal — no code…

ccxt9d45k
@ccxt@ccxtInstall Skill

Questions about pre-trade-discipline-gate.

Which coding agents can use pre-trade-discipline-gate?
pre-trade-discipline-gate installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.