gh-pr-merge

gh-pr-merge is a skill for Claude Code, Codex from mir-am/skills-agents-ai-coding. It costs 31 tokens per session (1,967 once invoked), scanned A, original, MIT.

A GitHub pull-request workflow that squash-merges an approved pull request, checks that it is ready, and verifies the result. A pull request is a proposed set of changes awaiting review before it enters the main codebase.

In plain words
What is it for?
Use it to merge a GitHub pull request by number, URL, or the pull request for the current branch. It preserves local branches and uncommitted work.
Why use it?
It removes the need to manually check reviews, required checks, authentication, and the merge result. It also cleans up the remote source branch after a successful merge unless you ask to keep it.

Skill for Claude CodeCodex

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

Good fit Use it to merge a GitHub pull request by number, URL, or the pull request for the current branch. It preserves local branches and uncommitted work.

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/mir-am/skills-agents-ai-coding/gh-pr-merge"><img src="https://agentmods.dev/badge/skills/mir-am/skills-agents-ai-coding/gh-pr-merge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,967 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.00031 $0.01967
Opus 5.5 $0.00012 $0.00787
Sonnet 5.5 $0.00006 $0.00393
Haiku 4.5 $0.00003 $0.00197

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

Security

Grade A, and why

gh-pr-merge 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 14d 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/gh-pr-merge/SKILL.md · 111 lines

How it starts

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

What I do

  • Resolve a PR number, URL, or the current branch's PR
  • Check authentication, PR state, required checks, and review requirements
  • Squash-merge the verified PR head without bypassing branch protection
  • Delete the source branch on GitHub after a verified merge unless the user requests retaining it
  • Preserve local branches and uncommitted work
  • Verify and report the merge result and resulting commit

When to use me

Use when the user asks to merge or squash-merge a GitHub PR. Squash is the default merge method for this skill. Do not merge merely because the user asks to create, review, or inspect a PR, or asks how merging works.

An explicit request to merge authorizes the merge and subsequent remote source-branch cleanup without another routine confirmation. Honor requests to retain the branch or requests limited to checking readiness. If the user explicitly requests a different merge method, do not silently squash it; explain this skill's scope or follow that request outside this workflow.

1. Resolve the PR

  1. Confirm GitHub CLI is installed and authenticated:
    gh auth status
    
  2. Use the supplied PR URL directly, or resolve a supplied number in the repository identified by the user or current checkout:
    gh pr view <number-or-url> --json number,url,title,state,isDraft,baseRefName,headRefName,headRefOid,headRepository,headRepositoryOwner,isCrossRepository,mergeable,mergeStateStatus,reviewDecision,statusCheckRollup
    
    With no number or URL, omit the positional argument to resolve the current branch's PR. If no PR or repository can be resolved unambiguously, ask for the PR number or URL rather than selecting an arbitrary open PR.
  3. Keep the resolved PR URL, full headRefOid, headRefName, and source repository (headRepositoryOwner.login and headRepository.name) before merging; the source repository can be a fork and its metadata may disappear after automatic branch deletion. Retain the GitHub hostname from the PR URL for API calls. Briefly identify the PR, its base branch, the squash strategy, and planned remote branch cleanup (or the user's retention request). Local uncommitted work is not included in a server-side merge; do not commit or push it as part of this skill.

Read the full file on GitHub · 111 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. 14d ago First seen · 111 lines · 31 tokens per session scan A daf2966d9a12

Subscribe to this mod's changes

gh-pr-merge is a skill published in the GitHub repository mir-am/skills-agents-ai-coding (2 stars, last pushed 15d ago), licensed MIT. It adds 31 tokens to every session and 1,967 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-10-02.