merge-pr

merge-pr is a skill for Claude Code from tomzx/agents. It costs 24 tokens per session (905 once invoked), scanned A, original, MIT.

A pull-request completion workflow that checks reviewer approval and passing automated checks before merging the change and removing its remote branch.

In plain words
What is it for?
Use it to inspect a pull request, stop when approvals or checks are incomplete, merge approved changes, delete the remote branch, and confirm linked issues were closed.
Why use it?
It prevents a pull request from being merged while required reviews or CI checks are still missing or failing. CI means automated checks that run against code changes.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: positional $N argument.

Good fit Use it to inspect a pull request, stop when approvals or checks are incomplete, merge approved changes, delete the remote branch, and confirm linked issues were closed.

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

Made for: Claude Code.

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-pr

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/tomzx/agents/merge-pr"><img src="https://agentmods.dev/badge/skills/tomzx/agents/merge-pr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 905 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.00024 $0.00905
Opus 5.5 $0.00010 $0.00362
Sonnet 5.5 $0.00005 $0.00181
Haiku 4.5 $0.00002 $0.00090

Measured 22d ago against content hash 8d6588b82cae, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

merge-pr 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 22d 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.

skills/merge-pr/SKILL.md · 123 lines

How it starts

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

Merge PR

Verifies that a pull request has the required approvals and passing CI checks, then merges it and cleans up the branch.

Prerequisites

  • Apply the shared SDLC conventions in skills/sdlc/references/shared.md.
  • If no argument is provided, target the pull request from $PR_NUMBER (and $REPO).
  • gh CLI authenticated with write access to the target repository
  • PR number ($1) identifying an open pull request
  • All review feedback addressed (run /handle-pr-reviewer-feedback first if comments are unresolved)

Workflow

Fetch PR status ($1)
        |
        v
  All approvals obtained?
     /         \
   Yes           No
    |             |
    v             v
CI checks      Report missing
passing?       approvals, stop
   /    \
 Yes     No
  |       |
  v       v
Merge   /handle-pr-ci
PR      (fix, then re-check)
  |
  v
Delete remote branch
  |
  v
Delete prs/<n>/review tag
  |
  v
Confirm issue closed

Steps

  1. Fetch the current PR status:

    gh pr view $1 --json state,reviews,statusCheckRollup,mergeStateStatus,headRefName,closingIssuesReferences
    
  2. Check approvals: confirm at least one reviewer has approved and no reviewers have requested changes. If approvals are missing or changes are requested, report the status and stop.

  3. Check CI: confirm all required status checks are passing. If any are failing or pending, invoke /handle-pr-ci $1 to diagnose and fix before continuing.

  4. Present the merge summary to the user (PR title, approvals, checks) and ask for confirmation.

  5. On confirmation, merge the PR:

    gh pr merge $1 --squash --delete-branch
    

    Use --squash by default for a clean history. If the project uses merge commits or rebase, adjust accordingly.

  6. Confirm the remote branch was deleted. If not, delete it:

    gh api repos/{owner}/{repo}/git/refs/heads/{branch} -X DELETE
    
  7. Delete the review checkpoint tag left by validate-pr / verify-pr / review-pr (see sdlc/references/shared.md, Review checkpoint tags):

    git tag -d "prs/$1/review" 2>/dev/null || true
    

Read the full file on GitHub · 123 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. 22d ago Changed · +10 lines 8d6588b82cae
  2. 28d ago Changed · +9 lines 0c7c5b02d0c7
  3. 1mo ago First seen · 104 lines · 24 tokens per session scan A aa385414fc13

Subscribe to this mod's changes

merge-pr is a skill published in the GitHub repository tomzx/agents (13 stars, last pushed yesterday), licensed MIT. It adds 24 tokens to every session and 905 once invoked, about $0.0001 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-03.

Related

Other skills, from other repositories

github-automation

GitHub workflow automation, PR management, issue tracking, and code review coordination. Integrates with GitHub Actions and repository management. Use when: PR creation, code review, issue management, release automation, workflow setup. Skip when: local-only changes, non-GitHub repositories.

ruvnet/ruflo · 61 tokens

github

GitHub via gh CLI: PRs, issues, reviews, repos, auth.

NousResearch/hermes-agent · 19 tokens

otto-drive-pr

PR mergeability, CI, and live preview.

omnigent-ai/omnigent · 14 tokens

voicestudio-maintainer

Triage GitHub issues, review contributor pull requests, diagnose CI, and prepare explicitly requested releases for VoiceStudio's Electron desktop app and Python backend. Use for repository maintenance work, not ordinary VoiceStudio audio generation.

debpalash/VoiceStudio · 50 tokens

release

Cut a brooks-lint release: set the version in package.json, propagate it across all four plugin manifests and every version-bearing text file (README badges, docs site metadata), write the CHANGELOG entry, validate, then commit, push, tag, and publish the GitHub release. Triggers when the maintainer asks to "release"…

hyhmrright/brooks-lint · 135 tokens

release-pr-review

Review pass on an open release PR (release/ → main) — the step between git-wrapup and release-and-publish when a project releases in gated release PR mode. Reads the PR's commit range through the code-simplifier lens plus a correctness review, verifies whatever an automated reviewer left on the PR, lands fixes as…

cyanheads/obsidian-mcp-server · 136 tokens