merge-train

merge-train is a skill for Claude Code from big-emotion/agent-atelier. It costs 159 tokens per session (3,803 once invoked), scanned A, original, MIT.

A workflow for processing many open GitHub pull requests in dependency order. It can check reviews and CI, fix eligible problems, resolve conflicts, and merge changes after confirmation.

In plain words
What is it for?
Use it to inspect a pull-request queue, calculate a safe merge order, fix CI or conflict issues, review changes, merge eligible pull requests, and report blocked ones.
Why use it?
It removes the manual effort of figuring out which pull requests should go first and what is blocking the rest.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the pr-trains plugin — 5 skills shipped together

Good fit Use it to inspect a pull-request queue, calculate a safe merge order, fix CI or conflict issues, review changes, merge eligible pull requests, and report blocked ones.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/big-emotion/agent-atelier/merge-train
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 big-emotion/agent-atelier --skill merge-train
Clone the repo
git clone --depth 1 https://github.com/big-emotion/agent-atelier

Made for: Claude Code.

Or install pr-trains, the plugin that ships this one along with the rest of its 5 skills.

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 merge-train

README.md
[![agentmods](https://agentmods.dev/badge/skills/big-emotion/agent-atelier/merge-train/github.svg)](https://agentmods.dev/skills/big-emotion/agent-atelier/merge-train)
Your own site
<a href="https://agentmods.dev/skills/big-emotion/agent-atelier/merge-train"><img src="https://agentmods.dev/badge/skills/big-emotion/agent-atelier/merge-train/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 merge-train

Your own site · 80×15
<a href="https://agentmods.dev/skills/big-emotion/agent-atelier/merge-train"><img src="https://agentmods.dev/badge/skills/big-emotion/agent-atelier/merge-train.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 159 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,803 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.00159 $0.03803
Opus 5 $0.00079 $0.01902
Sonnet 5 $0.00032 $0.00761
Haiku 4.5 $0.00016 $0.00380

Measured 10d ago against content hash 427a6afae9aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

merge-train 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 10d 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.

plugins/pr-trains/skills/merge-train/SKILL.md · 184 lines

How it starts

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

Merge Train

Process a whole list of open pull requests in one pass: order them, fix what is fixable, review them, then merge every PR that can be merged without breaking the order — and clearly report why each remaining PR is blocked.

This skill performs irreversible shared-repo actions (pushing fixes, merging PRs, posting comments). It follows a grouped-confirmation model: it does all read-only analysis first, presents one complete plan, and waits for a single explicit confirmation before performing any write. Until the user confirms, nothing is pushed, merged, or commented.

When to Activate

  • User shares a GitHub pull-requests URL (e.g. https://github.com/<org>/<repo>/pulls, a filtered query, or a milestone/label view) and asks to process, triage, order, or merge them.
  • User says: "process all the PRs", "what's the merge order", "fix CI and conflicts then merge what can be merged", "review and merge the open PRs", "clear the PR queue".
  • User invokes /merge-train (optionally with a GitHub PRs URL or --dry-run).

Inputs

  • Primary: a GitHub pull-requests URL. Any of: /pulls, a search query (/pulls?q=...), a label/milestone filter. Honor the filter in the URL — only the PRs that the URL would list are in scope.
  • If no URL is given, default to the current repo's open PRs (gh pr list), and ask the user to confirm the repo if it is ambiguous.
  • Flags:
    • --dry-run — produce the full plan and stop; never write. Overrides the confirmation step.
    • --base <branch> — treat this as the integration branch when detecting stacked PRs (default: auto-detect the repo default branch).
    • --ci-timeout <minutes> — per-PR ceiling on how long to wait for CI to reach a definitive state (default: 30). Once the ceiling is hit on a PR, that PR is left for the next run and reported as ci-still-pending; the train moves on.
    • --ci-poll <seconds> — interval between gh pr checks polls while waiting for CI (default: 30).

Preconditions

Read the full file on GitHub · 184 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. 10d ago First seen · 184 lines · 159 tokens per session scan A 427a6afae9aa

Subscribe to this mod's changes

merge-train is a skill published in the GitHub repository big-emotion/agent-atelier (2 stars, last pushed 3d ago), licensed MIT. It adds 159 tokens to every session and 3,803 once invoked, about $0.0008 per session on Opus 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-08-31.

Related

Other skills, from other repositories

bootstrap-working-agreements

Bootstrap a new repo with the full working-agreements + GitHub Project + CLAUDE.md hub-and-spokes setup in one pass. Use on a fresh repo, or on an existing repo that has no .claude/ tooling yet. Calls github-project-setup and split-claudemd as sub-steps; writes .claude/rules/working-agreements.md and a starter root…

toBzh30/Claude-Project-Bootstrap · 98 tokens

add-azuredevops

Adds Azure DevOps connector to a Power Apps code app. Use when querying work items, creating bugs, managing pipelines, or making ADO API calls.

microsoft/power-platform-skills · 37 tokens

pr-watch

Local PR watcher. Monitors CI status, automatically fixes failing checks by reading failure logs and applying targeted fixes, then optionally merges when all checks pass. Local CLI analog to Claude Code's cloud auto-fix feature.

SethGammon/Citadel · 46 tokens

merge-review

Reviews pending fleet worktree merges before they're accepted. Reads the merge-check queue, detects file-level conflicts between branches, proposes a safe merge order, and surfaces reconciliation plans for overlapping changes.

SethGammon/Citadel · 40 tokens

gitlab-devops

GitLab DevOps operations — issues, merge requests, CI/CD pipelines, repository browsing, labels, milestones, releases, and wiki management. Use when querying GitLab project status, monitoring pipeline executions, browsing repository files, creating issues for network findings, opening merge requests for config…

automateyournetwork/netclaw · 67 tokens

backlog

Read, work, and maintain a Git repo's deferred-work items in docs/backlog/, one file per item. Use when the user says "backlog", "check backlog", "what's on my backlog", "work the backlog", "address the backlog", "add to backlog", "clean up backlog", or when a review or task produced items that are real but not being…

umputun/cc-thingz · 96 tokens