merge-pr

merge-pr is a skill for Claude Code from joshukraine/dotfiles. It costs 23 tokens per session (992 once invoked), scanned A, original, MIT.

A guided way to finish a GitHub pull request, which is a proposed set of code changes, after checking its status.

In plain words
What is it for?
It helps identify the right pull request, check CI results, conflicts, and review feedback, squash the changes into one commit, update the base branch, and clean up the worktree and branch.
Why use it?
It reduces the chance of merging code before automated checks pass or while conflicts remain. It also keeps the merge and branch cleanup steps consistent.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Good fit It helps identify the right pull request, check CI results, conflicts, and review feedback, squash the changes into one commit, update the base branch, and clean up the worktree and branch.

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

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/joshukraine/dotfiles/merge-pr/github.svg)](https://agentmods.dev/skills/joshukraine/dotfiles/merge-pr)
Your own site
<a href="https://agentmods.dev/skills/joshukraine/dotfiles/merge-pr"><img src="https://agentmods.dev/badge/skills/joshukraine/dotfiles/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/joshukraine/dotfiles/merge-pr"><img src="https://agentmods.dev/badge/skills/joshukraine/dotfiles/merge-pr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 992 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00023 $0.00992
Opus 5 $0.00012 $0.00496
Sonnet 5 $0.00005 $0.00198
Haiku 4.5 $0.00002 $0.00099

Measured 9d ago against content hash 791577e1dc7d, 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 9d 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.

claude/.claude/skills/merge-pr/SKILL.md · 115 lines

How it starts

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

Merge Pull Request

Merge a pull request with consistent practices: verify checks, squash merge, clean up the branch, and pull the latest base branch.

Command Options

  • $ARGUMENTS: PR number (optional — defaults to the PR for the current branch)

Your task

Step 1: Identify the PR

  • If a PR number was provided, use it
  • Otherwise, detect from the current branch: gh pr view --json number,title,state,headRefName,baseRefName
  • Confirm the PR exists and is open
  • Display the PR title and number before proceeding

Step 2: Verify merge readiness

Check each of the following and report status:

  • CI status: Run gh pr checks to verify all required checks have passed
  • Merge conflicts: Run gh pr view --json mergeable to verify no conflicts
  • Review feedback: Run gh pr view --json reviewDecision,reviews to surface any unresolved review threads or a pending "changes requested" — advisory, not a hard gate. (Carries over the review-thread awareness from the retired /review-pr.)

If CI has not passed, stop and report. Do not proceed with the merge.

Step 3: Merge the PR

  • Squash merge: gh pr merge --squash
  • Do not pass --delete-branch — GitHub is configured to auto-delete remote branches on merge. Local branch cleanup is handled in Step 4.

Step 4: Detect worktree context

Before updating local state, determine whether you are inside a git worktree:

git rev-parse --git-dir
git rev-parse --git-common-dir
  • If these values are identical, you are in a normal repo — proceed with Step 5a.
  • If they differ, you are in a worktree — proceed with Step 5b.

Step 5a: Update local state (normal repo)

After gh pr merge completes:

  • Switch to the base branch (e.g., main, master, or whatever baseRefName was detected in Step 1) and pull: git switch <base-branch> && git pull
  • Delete the local feature branch with git branch -D <branch-name> (force-delete is required because squash merges produce a different SHA, so -d cannot detect the branch as merged)

Read the full file on GitHub · 115 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. 9d ago First seen · 115 lines · 23 tokens per session scan A 791577e1dc7d

Subscribe to this mod's changes

merge-pr is a skill published in the GitHub repository joshukraine/dotfiles (422 stars, last pushed 27d ago), licensed MIT. It adds 23 tokens to every session and 992 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-08-30.

Related

Other skills, from other repositories

review-pr

Review an existing GitHub PR — one verified single-pass read of the diff, inline P1–P3 findings, fixes for the P1/P2s pushed to the PR branch, scoped verification, resolved threads, a summary. Escalates to a two-reader second opinion only for large source changes. Use when asked to review and fix a PR, or to run the…

DJRHails/dotfiles · 87 tokens

patch-stack-action

Manage patch-stack forks — setup, daily patch editing, and sync workflows. Use when a repo references DJRHails/patch-stack-action, has commits prefixed "patch-stack:", or has patch/ branches.

DJRHails/dotfiles · 46 tokens

worktree

Manage git worktrees — setup, cleanup, and recovery. Use when the user asks to clean up, prune, create, or sync worktrees, create worktrees for open PRs, or create a worktree — and whenever a git command inside a worktree fails with "fatal: not a git repository ... .git/worktrees/ " (dangling worktree; recover in…

DJRHails/dotfiles · 109 tokens

pr-comments

Fetch, triage, and address PR review comments for the current branch. Use when asked to check PR comments, address review feedback, fix PR comments, or pull PR comments.

DJRHails/dotfiles · 39 tokens

merge-queue

Rescue PRs that are stuck in a GitHub merge queue. Use when a PR can't be force-pushed, gh pr merge --auto says "already queued", or Vercel preview fails because of a commit-email mismatch. Covers dequeue via GraphQL, force-push, re-enable automerge, and the Vercel commit-email diagnosis.

DJRHails/dotfiles · 77 tokens

commit

Read this skill before making git commits and pushing.

DJRHails/dotfiles · 11 tokens