merge-train
Skill1 starsChanged 4 months agoMITView on GitHub
Merge every open PR that is mechanically safe — CI green, approved, mergeable, autonomy label present, no unacknowledged override markers — in base-first order; everything else is reported with the exact fact it is missing. Use at end of week, before a release, or whenever open PRs have piled up. Dry-run by default.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- enjunear/skillstheir own version, first seen Oct 13, 2026
- erwins-enkel/shepherdtheir own version, first seen Oct 1, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- erwins-enkel/shepherd★ 23same name
- enjunear/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 59
Verify after: target-branch CI still green.
- Distinctive: line 68
Never widen the safe set inline.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/merge-train — Merge What's Proven, Report the Rest
"Safe to merge" is a claim, and claims need receipts. This skill reduces the claim to five mechanical facts and merges only where all five hold. A held PR is not a failure — its reason line tells a human exactly what to supply (a review, a label, a green run). No judgment happens at merge time; the judgment was banked here once.
The five facts (all must hold)
- CI green — every status check concluded SUCCESS/NEUTRAL/SKIPPED.
- Approved — review decision is APPROVED, or an evidence-backed
adversarial-review:passedlabel (step 2b). - Mergeable — no conflicts with the target branch.
- Autonomy label — the PR carries
autonomy:green, applied by a human. The label IS the standing approval; the model executing this skill never applies it. - Overrides acknowledged — any
JUDGMENT-OVERRIDE:marker in the PR body is matched by anoverride-ackedlabel.
Invocation
/merge-train # dry-run: SAFE/HELD report, no merges
/merge-train --execute # merge the SAFE set, base-firstProcedure
- Enumerate open PRs (GitHub:
python3 scripts/merge_train.pyships the whole check; other forges: gather the same five facts via their CLI/API). No forge access → every PR is UNVERIFIED, reported as such — never assumed safe. - Classify each PR SAFE or HELD; a HELD PR lists every missing fact.
2b. Adversarial review — the review a bot can't do. Read the diff trying
to find a reason it must NOT merge, framing it as an external
contributor's. Findings carry file:line evidence; post them, or
"adversarial pass: no blocking findings — checked
<dimensions>", as a PR comment. Run it on any substantive PR (behaviour-changing; docs, lockfile bumps, generated files and pure formatting are exempt) — measured at ~15% overhead for two fabrications CI structurally could not see.- It does not replace fact 2. A PR whose review bot silently never ran
may substitute the label
adversarial-review:passed, and that label counts ONLY when a comment backs it —merge_train.pyholds a labelled PR that has no evidence comment. The one route to SAFE without a real approval is the one route that must not be self-asserting. - Blocking findings → fix first. The label is never applied over open findings.
- It does not replace fact 2. A PR whose review bot silently never ran
may substitute the label
- On
--execute: merge the SAFE set in base-first order (PRs targeting the default branch before stacked PRs). A merge failure stops the train. - Verify after: target-branch CI still green.
- End with ONE verdict line and log it to the ledger:
MERGE-TRAIN: <n> merged (#ids) | <m> HELD (<top missing fact>) | <k> UNVERIFIED | target CI: green|redRules
- Never widen the safe set inline. "That red check is flaky" is a judgment call — the PR waits for a human, or the check gets fixed. Loosening the five facts is a one-way-door decision (/door), not an edit.
- HELD and UNVERIFIED are never silently upgraded.
Composes with
/refute— how a PR earns its evidence before approval./gate— the five facts are a standing gate; the ledger line is its record./verdict—MERGE-TRAIN:lines land in the append-only ledger, so the next train diffs against the last.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

