merge-pr

merge-pr is a skill for Claude Code from tomzx/agents. It costs 24 tokens per session (796 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
View source ↗ tomzx/agents
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 796 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.00796
Opus 5 $0.00012 $0.00398
Sonnet 5 $0.00005 $0.00159
Haiku 4.5 $0.00002 $0.00080

Measured 5d ago against content hash aa385414fc13, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 5d 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 · 104 lines

How it starts

The opening of the file, as written. The whole thing — 104 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
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. Confirm the linked issue was closed automatically (via Closes #N in the PR description). If not, close it manually:

    gh issue close <issue-number>
    

Read the full file on GitHub · 104 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. 5d 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 (6 stars, last pushed today), licensed MIT. It adds 24 tokens to every session and 796 once invoked, about $0.0001 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-09-03.

Related

Other skills, from other repositories

github

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

NousResearch/hermes-agent · 19 tokens

github

Full GitHub CLI control — issues, PRs, code reviews, repo management. Uses gh CLI with auth detection, rate limiting, and templates. Triggers on: github, issue, pull request, PR, code review, repo, branch, label, assignee, milestone, release, workflow, actions.

adolfousier/opencrabs · 0 tokens

release

Release gentle-pi through GitHub and npm. Trigger: release, publish, npm publish, GitHub release, version bump.

Gentleman-Programming/gentle-pi · 28 tokens

pre-publish-review

Nuclear-grade 12-agent pre-publish release gate. Runs /get-unpublished-changes to detect all changes since last npm release, spawns up to 10 ultrabrain agents for deep per-change analysis, invokes /review-work (orchestrator manual QA plus one gate reviewer) for holistic review, and 1 oracle for overall release…

code-yeongyu/oh-my-openagent · 161 tokens

parallel-pr-review

Use when asked to "review the open PRs", review a batch or stack of pull requests, or run a recurring PR-review pass on a repo — especially with many PRs, stacked branches, conflicts, or security-sensitive changes. Covers grouping, fan-out to review subagents, verdict synthesis, and posting.

suyoumo/ClawProBench · 67 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