/stop-the-train:stop-the-trainfrom stop-the-train
Put a gate before each stage of multi-step agent work, write every gate's deliverables, criteria, and judge before the work starts, and let each gate return Go, Hold, or Kill. Use when agent work runs through several stages before something leaves the machine (send, publish, share, grant, pay, delete, deploy), when one agent both does and approves its own work, when several agents share one line and keep losing it between turns, when "done" or "90 percent" keeps passing reviews, or when the user says "stage-gate", "phase gate", "add gates", "go/kill", or "approval gates". Korean triggers "스테이지게이트", "단계 관문", "팀 대장", "관문 넣어", "게이트 칸반", "중간 검수 넣어", "고 킬 판정". For a single test or push, verify its result directly. For a handoff between teams, name the sender and recipient.
Ships in stop-the-train. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Put a gate before every stage of agent work. Write what passes each gate before the work starts, have someone other than the doer judge it, and let the gate say Hold or Kill as readily as Go.
Agent work without gates fails in three ways:
List the stages from the request to the last outward step: send, publish, share, grant, pay, delete, or deploy. One reversible step needs no gates; do it and check it. Use the lite line, one gate before each outward step, for small routine work. Use the full line, a gate before every stage after the first, for new, costly, or irreversible work. When two or more agents share the line, or it outlives one session, run it as a team: read team.md for the roles, the ledger, and the patrol. Past nine workers under one leader, split off a sub-team. Gate: a written stage list with its size, or a recorded reason this work needs no gates; for a team, the ledger exists before the first stage is handed out.
Read gate-card.md. Each gate stands before the stage it opens and checks what the stage before delivered. Before that earlier stage starts, write the card: deliverables, must-meet criteria, should-meet criteria, the judge, and whether the stage it opens is outward. Prefer criteria a machine can check against a source record. A change to a card after its stage starts makes a new version, and the gate runs again. Gate: every card names deliverables, at least one must-meet criterion, and a judge.
Read gatekeepers.md. Give each gate one of three judges: fields (required fields present), machine (a check against the source record or an official standard), or human. Agents may pass fields and machine gates themselves. Put a human gate right before every outward step, and elsewhere only where the judgement is subjective; write down why. The agent that did a stage never judges its gate. Gate: every gate has a judge kind and a named judge who is not the doer of the work it checks.
Before real work goes through, feed every fields and machine gate one planted defect, such as a missing field or another person's name. It must return Hold or Kill; a gate that lets it through is dead and gets fixed first. Check sharing and permission gates as the receiver, not as an admin. Gate: every gate that is not human has been seen to stop a planted defect.
Do the stage. End it by handing over the deliverables on the card: files, command output, record links, hashes. A status sentence is not a deliverable. The next stage receives the exact artifact the gate checked; anything rebuilt goes through the gate again. Gate: each deliverable on the card exists as a thing the judge can open.
Read decisions.md. The judge compares the deliverables with the card and asks two questions: was the stage done well, with data that can be trusted, and is the work still worth the next stage? Append one row to the transition log: Go, Go with conditions (open should-meet items, each with a deadline), Hold (what it waits for, who supplies it, when it is checked again), or Kill (why). The stage moves only through this row. Run check_line.py on the cards and the log. Gate: the checker passes, and the newest row for this gate carries the current card version.
When a gate returns Hold or Kill, nothing behind it moves. After a Kill, stop all activity on the work and release what it held. After the last outward step, record what the line cost and what it changed, and carry one change into the next line's cards. Report each gate's decision to the user with its evidence. Gate: no work stands past a gate without a Go row, and the closing note names cost, effect, and the next change.
sources.md says where each rule came from.
SKILL.ko.md (opens in a new tab)agents/openai.yaml (opens in a new tab)assets/line.example.json (opens in a new tab)assets/team-line.example.json (opens in a new tab)assets/team-transitions.example.jsonl (opens in a new tab)assets/transitions.example.jsonl (opens in a new tab)references/decisions.md (opens in a new tab)references/gate-card.md (opens in a new tab)references/gatekeepers.md (opens in a new tab)references/sources.ko.md (opens in a new tab)references/sources.md (opens in a new tab)references/team.md (opens in a new tab)scripts/check_line.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub robfold/stop-the-train --plugin stop-the-train