pr-merge

Merge GitHub pull requests after validating CI checks and merge state.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safeguard GitHub PR merges by enforcing strict CI validation and merge state checks to prevent unsafe code from entering main.

Core Features & Use Cases

  • Enforces CI validation before merging PRs and evaluates mergeStateStatus (CLEAN, BEHIND, BLOCKED, DIRTY) to ensure safe merges.
  • Supports configurable merge strategies (squash, merge, rebase) and optional branch deletion, adaptable to standalone or my-workflow installations.
  • Integrates with GitHub CLI (gh) to query PR state, status checks, and perform merges, enabling automation in team workflows.

Quick Start

Configure the skill with /pr-merge configure, then run /pr-merge to merge the PR for your current branch.

Frequently Asked Questions about pr-merge

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

FAQPage Schema
How do I enforce CI validation before merging a GitHub pull request?

To prevent merging unsafe code into main, this skill evaluates the pull request mergeStateStatus and blocks the merge process when CI checks fail or the branch is in a dirty state.

How do I handle behind or dirty branch states when merging a PR?

Handling behind or dirty branch states involves checking the mergeStateStatus before merging; the skill identifies these conditions and prevents the GitHub merge until the branch is clean and CI passes.

Can I configure merge strategies like squash or rebase for GitHub PR merges?

Yes, you can configure merge strategies such as squash, merge, or rebase, and set optional branch deletion preferences during the setup to adapt the workflow to your team's requirements.

Do I need GitHub CLI authentication to automate pull request merges?

Yes, GitHub CLI authentication is required to query PR context from the current branch, evaluate merge states, and perform the actual pull request merge operations securely.

What happens if CI checks fail during an automated GitHub PR merge?

If CI checks fail during an automated GitHub PR merge, the process halts immediately to prevent unsafe code from entering the main branch, ensuring strict validation compliance.