New to Claude Skills? Learn how to install them →

tradermonty on GitHub

Pre-Trade Discipline Gate

Free

Ensure disciplined trading decisions before order entry.

Get this skill

Free · Opens the source repo

What Pre-Trade Discipline Gate does

The Pre-Trade Discipline Gate is a skill designed for traders who want to enforce a disciplined approach to manual order entries. It evaluates a local pre-trade checklist before any order is placed, ensuring that only well-planned trades proceed. This skill is particularly useful for traders who want to avoid impulsive decisions that can lead to losses, such as revenge trading after a setback. By adhering to a structured checklist, traders can maintain discipline and consistency in their trading strategies.

The skill operates offline, meaning it does not interact with broker APIs or fetch live market data. Instead, it relies on a local JSON or YAML file containing checklist answers, which must include details about the trade such as the symbol, order intent, and risk parameters. The skill checks these inputs against predefined rules, blocking any entries that do not meet the criteria, such as lack of a written plan or exceeding planned risk. This helps traders to reflect on their decisions and maintain a clear trading strategy.

In addition to blocking non-compliant trades, the skill also produces a journal entry for each decision made, which can be reviewed later in the trader-memory-core. This feature is particularly beneficial for those who wish to analyze their trading behavior over time and improve their decision-making process. The outputs include both a JSON decision artifact and a markdown report summarizing the results, ensuring that all relevant information is documented for future reference.

Overall, the Pre-Trade Discipline Gate is an essential tool for traders who prioritize discipline and structured decision-making. It is especially valuable for those who have experienced losses and want to prevent emotional trading. By implementing this skill, traders can enhance their trading practices and make more informed decisions based on their established strategies.

When to use it

Use this skill immediately before placing any manual entry order to ensure adherence to your trading plan.

When not to use it

This skill is not suitable for automated trading systems or scenarios where live market data is required; it strictly evaluates pre-trade checklists.

What you can build with it

Pre-Trade Evaluation

Use this skill right before placing a manual order to ensure all criteria are met.

Post-Loss Trading

After experiencing a loss, use this skill to avoid revenge trading by adhering to your checklist.

Checklist Adherence

Incorporate this skill into your workflow to ensure that all trades are compliant with your trading plan.

How to install Pre-Trade Discipline Gate

View source

1. Install with the skills CLI

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

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by tradermonty

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.

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

DecisionMeaning
GOAll actionable manual-order candidates passed the checklist and upstream gates
REVIEW_REQUIREDInputs are missing, unknown, or journaling failed; do not place orders until reviewed
NO_GOAt least one actionable candidate violated a discipline rule
NO_ACTIONABLE_ORDERSThe 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.

Rules

The gate blocks an actionable candidate when:

  • The entry is not confirmed in the written plan
  • The stop is not predefined
  • The size is not confirmed within plan
  • actual_risk_dollars exceeds planned_risk_dollars
  • trader-memory-core has a losing exit or partial loss inside the revenge window
  • exposure-coach recommendation is REDUCE_ONLY or CASH_PRIORITY
  • drawdown-circuit-breaker recommendation is COOLDOWN, HALTED, or TRADING_HALTED

Missing or unreadable market-regime or circuit-breaker artifacts produce REVIEW_REQUIRED for actionable orders. If no actionable order exists, the result remains NO_ACTIONABLE_ORDERS.

Outputs

The script writes:

  • pre_trade_discipline_decision_YYYY-MM-DD_HHMMSS.json
  • A matching markdown report unless --json-only is set
  • A JSONL journal row under state/journal/pre-trade-discipline/ when --journal-dir is provided

Each candidate result includes a checklist_answers object with the written-plan, stop, size, risk-dollar, and notes answers used for the decision, so later reviews can audit what was answered at order time.

If a candidate includes thesis_id and --state-dir is provided, the JSON report is linked into the thesis linked_reports list using trader-memory-core link_report. The skill does not call mark_reviewed and does not change monitoring review dates.

Resources

  • scripts/check_pre_trade_discipline.py - Main CLI and rule engine
  • references/discipline_gate_framework.md - Rule definitions and integration notes
  • skills/trader-memory-core/schemas/thesis.schema.json - Thesis state schema

Key Principles

  1. Manual execution only - The output is a pre-broker checklist gate, not an order router.
  2. Written plan first - No written entry plan, stop, or size confirmation means no manual entry.
  3. Producer-compatible state reading - Revenge-risk detection follows trader-memory-core timestamp and outcome behavior.
  4. Journal without review side effects - The gate links reports to theses without advancing review schedules.

Frequently asked questions about Pre-Trade Discipline Gate

Similar skills