pr-merge

Merge reviewed GitHub pull requests and clean up branches and worktrees.

89|7|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/nikhilsitaram/claude-caliper --skill pr-merge-nikhilsitaram
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr-merge
Source: https://github.com/nikhilsitaram/claude-caliper/tree/main/skills/pr-merge
Command: npx skills add https://github.com/nikhilsitaram/claude-caliper --skill pr-merge-nikhilsitaram

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the final friction from finishing a reviewed pull request by handling the merge, branch cleanup, and worktree cleanup in one safe workflow.

Core Features & Use Cases

  • Review-aware merging: Only proceeds after a pull request has been reviewed, helping prevent accidental merges.
  • GitHub and worktree cleanup: Detects whether the repository is using a worktree, then removes local and remote branch state appropriately after merge.
  • Merge strategy handling: Chooses squash or rebase behavior based on branch type, repository settings, and explicit flags.
  • Failure-safe operations: Checks merge readiness, handles auto-merge when available, polls merge state, and stops when conflicts or protections require human intervention.

Quick Start

Use the pr-merge skill to merge the reviewed pull request you are currently working on and clean up its branch and worktree afterward.

Frequently Asked Questions about pr-merge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely merge a reviewed pull request and clean up the branch afterward?

To safely merge a reviewed pull request and clean up the branch, you can use a workflow that checks review status, handles merge method selection, polls merge state, and deletes local and remote branches with guardrails. This prevents accidental merges and ensures safe cleanup.

Can I automate branch and worktree cleanup after a GitHub pull request merge?

Yes, you can automate branch and worktree cleanup after a GitHub pull request merge by using a process that detects worktree setups and removes local and remote branch state appropriately. This ensures safe cleanup with fallbacks if conflicts or protections require human intervention.

How does merge strategy selection work for squash and rebase operations?

Merge strategy selection for squash and rebase operations works by choosing the behavior based on branch type, repository settings, and explicit flags. The process checks merge readiness and handles auto-merge when available, stopping when conflicts or protections require human intervention.

Does this pull request merge workflow support integration and phase branches?

Yes, this pull request merge workflow supports standard repositories and worktree-based setups, including integration branches, phase branches, and direct merges after review. It applies guardrails and fallbacks to ensure safe operations across these different branch configurations.

What happens if a pull request has merge conflicts or branch protection rules?

If a pull request has merge conflicts or branch protection rules, the merge process stops and requires human intervention. It checks merge readiness, handles auto-merge enablement when available, and uses failure-safe operations to avoid unsafe merges.

Why do I need to check review status before merging a pull request?

You need to check review status before merging a pull request to prevent accidental merges of unreviewed code. Review-aware merging ensures the workflow only proceeds after a pull request has been reviewed, removing final friction while maintaining safety guardrails.