
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.
- Installs
- 2.7K
- Last 24h
- +23
- Trending rank
- #5187
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/tradermonty/claude-trading-skills --skill pre-trade-discipline-gate- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads pre-trade-discipline-gate automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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_decisionandcircuit_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_decisionJSON from market-regime-daily / exposure-coach - Optional
circuit_breaker_decisionJSON 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; 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.
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
- Either risk-dollar field is missing or is not a finite, non-negative number (
REVIEW_REQUIRED) actual_risk_dollarsexceedsplanned_risk_dollars- trader-memory-core has a losing exit or partial loss inside the revenge window
- exposure-coach recommendation is
REDUCE_ONLYorCASH_PRIORITY - drawdown-circuit-breaker recommendation is
COOLDOWN,HALTED, orTRADING_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-onlyis set - A JSONL journal row under
state/journal/pre-trade-discipline/when--journal-diris 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. Invalid risk-dollar values are stored as JSON null. Valid JSON decimals that cannot round-trip through a binary float are retained as numeric strings so underflow or precision loss cannot change the gate decision.
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 enginereferences/discipline_gate_framework.md- Rule definitions and integration notesskills/trader-memory-core/schemas/thesis.schema.json- Thesis state schema
Key Principles
- Manual execution only - The output is a pre-broker checklist gate, not an order router.
- Written plan first - No written entry plan, stop, or size confirmation means no manual entry.
- Producer-compatible state reading - Revenge-risk detection follows trader-memory-core timestamp and outcome behavior.
- Journal without review side effects - The gate links reports to theses without advancing review schedules.
FAQ
What does the pre-trade-discipline-gate skill do?
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.
How do I install pre-trade-discipline-gate?
Run npx skills add https://github.com/tradermonty/claude-trading-skills --skill pre-trade-discipline-gate in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/pre-trade-discipline-gate/ (personal) or .claude/skills/pre-trade-discipline-gate/ (project).
Which AI agents can use pre-trade-discipline-gate?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is pre-trade-discipline-gate safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains pre-trade-discipline-gate?
It is published by tradermonty in tradermonty/claude-trading-skills. It has 2,726 recorded installs.
More from tradermonty/claude-trading-skills
us-stock-analysis
tradermonty/claude-trading-skills
Comprehensive US stock analysis including fundamental analysis (financial metrics, business quality, valuation), technical analysis (indicators, chart patterns, support/resistance), stock comparisons, and investment report generation. Use when user requests analysis of US stock tickers (e.g., "analyze AAPL", "compare TSLA vs NVDA", "give me a report on Microsoft"), evaluation of financial metrics, technical chart analysis, or investment recommendations for American stocks.
market-news-analyst
tradermonty/claude-trading-skills
This skill should be used when analyzing recent market-moving news events and their impact on equity markets and commodities. Use this skill when the user requests analysis of major financial news from the past 10 days, wants to understand market reactions to monetary policy decisions (FOMC, ECB, BOJ), needs assessment of geopolitical events' impact on commodities, or requires comprehensive review of earnings announcements from mega-cap stocks. The skill automatically collects news using WebSearch/WebFetch tools and produces impact-ranked analysis reports. All analysis thinking and output are conducted in English.
backtest-expert
tradermonty/claude-trading-skills
Expert guidance for systematic backtesting of trading strategies. Use when developing, testing, stress-testing, or validating quantitative trading strategies. Covers "beating ideas to death" methodology, parameter robustness testing, slippage modeling, bias prevention, and interpreting backtest results. Applicable when user asks about backtesting, strategy validation, robustness testing, avoiding overfitting, or systematic trading development.
technical-analyst
tradermonty/claude-trading-skills
This skill should be used when analyzing weekly price charts for stocks, stock indices, cryptocurrencies, or forex pairs. Use this skill when the user provides chart images and requests technical analysis, trend identification, support/resistance levels, scenario planning, or probability assessments based purely on chart data without consideration of news or fundamental factors.
market-environment-analysis
tradermonty/claude-trading-skills
Comprehensive market environment analysis and reporting tool. Analyzes global markets including US, European, Asian markets, forex, commodities, and economic indicators. Provides risk-on/risk-off assessment, sector analysis, and technical indicator interpretation. Triggers on keywords like market analysis, market environment, global markets, trading environment, market conditions, investment climate, market sentiment, forex analysis, stock market analysis, 相場環境, 市場分析, マーケット状況, 投資環境.
portfolio-manager
tradermonty/claude-trading-skills
Comprehensive portfolio analysis using Alpaca MCP Server integration to fetch holdings and positions, then analyze asset allocation, risk metrics, individual stock positions, diversification, and generate rebalancing recommendations. Use when user requests portfolio review, position analysis, risk assessment, performance evaluation, or rebalancing suggestions for their brokerage account.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.