mergetrain

mergetrain is a skill for Claude Code, Codex from yongjip/mergetrain. It costs 75 tokens per session (614 once invoked), scanned A, original, MIT.

A workflow for combining committed branches from multiple coding agents working in separate Git worktrees. A worktree is a separate local checkout of the same repository, and the workflow integrates branches in a specified order.

In plain words
What is it for?
Use it to enqueue finished agent branches, merge them in order, run the authorized validation workflow, push the integration result, and recover from an interrupted push when permitted.
Why use it?
It gives one authorized runner responsibility for merging, validation, and pushing, reducing conflicts over shared integration branches. It also defines boundaries for queueing, deployment, recovery, and destructive actions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to enqueue finished agent branches, merge them in order, run the authorized validation workflow, push the integration result, and recover from an interrupted push when permitted.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yongjip/mergetrain/baseline
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add yongjip/mergetrain --skill baseline
Clone the repo
git clone --depth 1 https://github.com/yongjip/mergetrain

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mergetrain

README.md
[![agentmods](https://agentmods.dev/badge/skills/yongjip/mergetrain/baseline/github.svg)](https://agentmods.dev/skills/yongjip/mergetrain/baseline)
Your own site
<a href="https://agentmods.dev/skills/yongjip/mergetrain/baseline"><img src="https://agentmods.dev/badge/skills/yongjip/mergetrain/baseline/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mergetrain

Your own site · 80×15
<a href="https://agentmods.dev/skills/yongjip/mergetrain/baseline"><img src="https://agentmods.dev/badge/skills/yongjip/mergetrain/baseline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 614 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00075 $0.00614
Opus 5.5 $0.00030 $0.00246
Sonnet 5.5 $0.00015 $0.00123
Haiku 4.5 $0.00007 $0.00061

Measured 1mo ago against content hash 3c083b1fa32f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mergetrain scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

benchmarks/discovery/eligibility/baseline-skill.md · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Integrate parallel coding-agent branches

Purpose: Serialize committed local task branches through one merge/test/push/verify runner.

Rules

  1. Work on a task-specific branch and worktree.
  2. Commit a clean HEAD before handing work off.
  3. Read mergetrain status --json and follow its next action before changing queue state.
  4. Enqueue every named finished branch in the requested order using only its task and branch; mergetrain resolves the worktree and captures the exact commits. Stop after the last successful enqueue unless the user explicitly authorized validation or the complete validation-and-deployment workflow.
  5. Never push configured integration refs directly. One authorized runner owns validation and deployment; recovery and destructive actions require their stated approval.

Safety boundary

  • A task agent enqueues every named finished branch, then stops. "Queue for validation" authorizes enqueue only; only an explicit request to run validation or the complete end-to-end workflow authorizes validate.
  • Only a separately authorized runner uses deploy or a daemon.
  • Deployment requires either confirmation of the human-readable exact plan or prior bounded unattended approval. Agents never select train IDs or supply plan hashes; structured evidence may include identifiers for inspection.
  • Unattended approval is bound to the exact destination and execution policy. Any change blocks before push.
  • Recovery and destructive cleanup require their stated approval. Follow status.next_action; never rewrite permanent deploy audit refs.

Stable machine contract

  • Every JSON payload carries contract_version; ignore unknown keys and fail closed on unknown safety actions.
  • deploy means the atomic Git ref update plus configured verification. A downstream provider release is separate.

Use the plugin's MCP tools when they are available. Start with mergetrain_status; its next action is guidance, not deployment authority. Routine task agents call mergetrain_enqueue for every named committed, clean branch in order and stop after the last successful handoff.

Read the full file on GitHub · 52 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 52 lines · 75 tokens per session scan A 3c083b1fa32f

Subscribe to this mod's changes

mergetrain is a skill published in the GitHub repository yongjip/mergetrain (7 stars, last pushed today), licensed MIT. It adds 75 tokens to every session and 614 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other skills, from other repositories

blueprint-refactor-tranche

Take ONE target from the plan and land it without changing behaviour: guard it on the untouched code, move it verbatim, prove the equivalence by running both, mutation-sweep the tests, pass every gate, open a PR and merge it on green CI — or decline it with the cost written down.

receptron/mulmoterminal · 69 tokens

blueprint-repo-baseline

Find the repository's own gates — install, format check, lint, typecheck, build, test — record them, and prove they all pass before anything is touched.

receptron/mulmoterminal · 41 tokens

blueprint-repo-ci

Find out whether GitHub Actions already runs the recorded gates on every pull request, and record what is missing. Change nothing: adding CI is the first change the person approves.

receptron/mulmoterminal · 41 tokens

blueprint-repo-state

Confirm the folder is a clean clone of a GitHub repository on its up-to-date default branch, and keep the build's own notes out of git.

receptron/mulmoterminal · 37 tokens

blueprint-docs-workspace

Make sure chaff runs in this document folder and that the build's records have a place, before anything is read or written.

receptron/mulmoterminal · 33 tokens

crow-ci-queue

Serialize the label-gated ci:full suite across the PRs of live Crow sessions — per repo, exactly one session PR holds ci:full, runs the full suite and merges; then the next ready PR is updated from main and labeled. Strips the extras, orders the rest, and waits on a background watcher. Keeps running after a repo…

corveil/crow · 135 tokens