pr-merge

Merge pull requests with conflict resolution and worktree cleanup.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/calebeynon/claude-code-setup --skill pr-merge-calebeynon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr-merge
Source: https://github.com/calebeynon/claude-code-setup/tree/main/skills/pr-merge
Command: npx skills add https://github.com/calebeynon/claude-code-setup --skill pr-merge-calebeynon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates merging a pull request, resolves conflicts when needed, and cleans up the associated worktrees to keep the repository tidy.

Core Features & Use Cases

  • Detects whether you're in the main or a feature worktree and identifies the relevant repo context.
  • Checks PR status (CI pass, required approvals, and conflicts) and selects a safe merge path.
  • Resolves conflicts when necessary, completes the merge (squash, merge commit, or rebase), and pushes updates.
  • Cleans up worktrees and local branches to maintain a clean working environment post-merge.
  • (Optional) Synchronizes wiki/docs if the repository uses a wiki or related docs.

Quick Start

Invoke with /pr-merge to merge the current PR, resolve conflicts, and clean up worktrees.

Frequently Asked Questions about pr-merge

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

FAQPage Schema
How do I merge a pull request and resolve conflicts automatically?

You can merge a pull request and resolve conflicts by running the Skill to check CI status, detect conflicts, apply resolution strategies, execute the merge, and push updates to the main branch.

How does conflict resolution work when merging a feature branch into main?

Conflict resolution works by detecting whether you are in a main or feature worktree, checking the PR status, resolving necessary conflicts, and completing the merge using squash, merge commit, or rebase strategies.

Can I use admin overrides to merge a pull request on protected branches?

Yes, optional admin overrides can be used to merge pull requests on protected branches after the Skill verifies CI checks and required approvals during its PR status verification process.

What is the best way to clean up git worktrees after a branch merge?

The best way to clean up git worktrees after a branch merge is to use a workflow that automatically removes associated worktrees and local branches post-merge to maintain a clean working environment.

Does the merge process check CI status before completing the pull request?

Yes, the merge process checks CI pass status and required approvals before completing the pull request, selecting a safe merge path based on environment detection and PR status checks.

Why does worktree cleanup fail after merging a pull request?

Worktree cleanup may fail after merging a pull request if the repository context is incorrectly detected or if the branch synchronization encounters conflicts requiring manual resolution before deletion.