
Merge PR
Lands an open GitHub PR: waits for CI, fixes blockers, squash-merges, cleans up
Merge PR is an open-source agent skill for developer tools. It is available on Claude Code.
- Scripts
- shell
- Platforms
- Claude Code
- GitHub stars
- 5
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Merge PR
This skill takes a pull request that is already open and drives it to a squash merge. It waits for the checks on the head commit, works through blockers such as failing CI, conflicts with the latest main branch and unresolved review comments, and only merges once GitHub reports the PR as mergeable. After the merge it re-checks the base branch's CI run, so the outcome is known rather than assumed.
The workflow is split into step files that the agent opens as it reaches them. It reuses the repository's committed profile for conflict hot-spots and commit identity, and it uses bundled bash scripts that wrap the tracker CLI. The merge itself runs through a guarded script that decides the outcome from the PR state read back afterwards rather than from the exit code of the merge call.
Follow-up work discovered during the merge is clustered by root cause and filed as at most three new issues through a separate issue-creation skill. The skill then removes the PR's local worktree and branch and checks whether the remote branch remains. It expects an authenticated gh, glab or az CLI with merge rights, plus git, and a repository initialised with the tagout profile.
When your agent uses it
Land an open GitHub pull request. Use whenever the user wants to MERGE, land, ship, or close out an open PR: waits for CI, applies corrections until mergeable (red checks, conflicts with the latest `main`, unresolved review), squash-merges, triages follow-ups, and tears down the branch and worktree. Triggers: "merge PR 279", "land #281", "ship this PR", "get that PR merged once CI's green", "wrap up 279 and open follow-ups", « merge la PR 279 », « fais atterrir la 281 », a bare PR link with "merge it". Does NOT apply to opening or implementing a PR, to syncing one STILL BEING BUILT (implement-issue), to reviewing without merging (code-review), or to filing an issue (create-issue).
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
- Runs shell scripts(see the files on GitHub)
- No network calls found in its scripts(see the files on GitHub)
- License: MIT(see the files on GitHub)
From a static check of its 19 files (211 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the tagout plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add phmatray/tagout
/plugin install tagout@tagout-marketplaceOr copy only this skill to ~/.claude/skills/merge-pr:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/phmatray/tagout.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/merge-pr &&
cp -R "$tmp/plugins/tagout/skills/merge-pr" ~/.claude/skills/merge-pr &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/merge-pr inside it instead.
Copy the skill folder to ~/.agents/skills/merge-pr to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/phmatray/tagout.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/merge-pr &&
cp -R "$tmp/plugins/tagout/skills/merge-pr" ~/.agents/skills/merge-pr &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/merge-pr inside it instead.
Copy the skill folder to ~/.cursor/skills/merge-pr to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/phmatray/tagout.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/merge-pr &&
cp -R "$tmp/plugins/tagout/skills/merge-pr" ~/.cursor/skills/merge-pr &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/merge-pr inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/phmatray/tagout.git --path plugins/tagout/skills/merge-prOr copy the folder to ~/.gemini/skills/merge-pr yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/merge-pr:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/phmatray/tagout.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/merge-pr &&
cp -R "$tmp/plugins/tagout/skills/merge-pr" ~/.copilot/skills/merge-pr &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/merge-pr inside it instead.
Get the folder:
git clone --depth 1 https://github.com/phmatray/tagout.gitThen copy tagout/plugins/tagout/skills/merge-pr into your agent's skills folder as merge-pr. Agents that support SKILL.md read one folder per skill.
What it does
- Waits for CI checks
- Waits for the checks on the PR head commit and reads each result before deciding whether to continue.
- Corrections loop
- Clears red checks, merge conflicts with main and unresolved review notes, then pushes and re-waits until the PR is clean.
- Guarded squash merge
- Squash-merges only when CI is green and GitHub reports the PR mergeable, confirming the result from PR state.
- Base branch CI check
- Reads the CI run triggered on main by the merge and reports whether it passed, failed or was inconclusive.
- Follow-up triage
- Groups deferred work by root cause, folds it into existing issues and files a small number of new ones.
- Branch and worktree cleanup
- Removes the PR's local worktree and branch and checks whether the remote branch was left behind.
Good for
- Merge PR 279 once its CI passes
- Land #281 after fixing a conflict with main
- Ship this PR and wrap up the follow-ups
- Clean up the branch and worktree after a merge
Merge PR FAQ
What does Merge PR need to run?
An authenticated gh, glab or az CLI with merge and push rights, plus git. It reads the repository's committed profile at .claude/skills/repo-profile.md, which is generated by init.
When does Merge PR stop instead of merging?
It stops if the CLI is not authenticated, the PR is missing or already closed, CI stays red after a real fix attempt, a conflict is ambiguous, or a required review or protection rule cannot be satisfied.
Does Merge PR override failing checks?
No. It does not merge over a red bar, disable failing tests or use admin overrides on required checks.
Does Merge PR handle opening or reviewing a PR?
No. Opening or implementing a PR, syncing one still being built, reviewing without merging and filing issues are handled by other skills.
How do I install Merge PR in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/merge-pr to use it in all your projects, or to .claude/skills/merge-pr in one project. Or install the tagout plugin, which includes it: /plugin marketplace add phmatray/tagout, then /plugin install tagout@tagout-marketplace.
Does Merge PR run scripts?
Yes. It runs shell scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Merge PR?
Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.
What are the best alternatives to Merge PR?
The closest alternatives to Merge PR are Gh PR merge worktree checkout trap, Resolve merge conflicts, Fix PR, GitHub triage and Git post merge cleanup.
Where this comes from
- Description: from the skill's own SKILL.md.
More from phmatray/tagout

Guides an agent through a gated, phased upgrade of legacy .NET applications
- Open source
- 5 GitHub stars
- Developer tools

Consolidates open migration follow-ups across repos and updates them at the source
- Open source
- 5 GitHub stars
- Developer tools

Runs a parallel fleet of agents that implement and merge GitHub issues from a backlog
- Open source
- 5 GitHub stars
- Developer tools

Files a fully seeded GitHub issue with brainstorm, spec and implementation plan
- Open source
- 5 GitHub stars
- Developer tools

Turns a finished branch or a fix left on main into a guarded, linked pull request
- Open source
- 5 GitHub stars
- Developer tools

Makes the agent find a bug's root cause with a reproducible test before any fix
- Open source
- 5 GitHub stars
- Developer tools





