merge-github-pr

Merge eligible GitHub pull requests after validating mergeability, CI checks, and approvals.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents unsafe merges by ensuring GitHub pull requests are conflict-free, have passing CI, and include the required approvals before they are merged.

Core Features & Use Cases

  • Automated readiness gating: Evaluates mergeability, CI check results, and review approval status from the loaded PR context.
  • Conflict and protection enforcement: Never merges when conflicts exist, CI is failing, or required protections/approvals are not satisfied.
  • Operational workflow: Loads PR context deterministically via the provided script (or falls back to GitHub MCP), merges via the CLI, then verifies success and cleans up the branch when configured.

Use Case: When multiple contributors open pull requests, this Skill merges only those that are approved and fully green in CI, while clearly listing skipped PRs and why.

Quick Start

Ask the assistant to run the merge-github-pr skill for pull requests that are ready to merge in your GitHub repository.

Frequently Asked Questions about merge-github-pr

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

FAQPage Schema
How do I safely merge a GitHub pull request only after CI checks and approvals pass?

To safely merge a GitHub pull request, this skill validates mergeability, passing CI checks, and required approvals before applying the merge. It blocks unsafe merges when conflicts exist, CI is failing, or required branch protections are not satisfied.

Can I automate merging multiple pull requests while enforcing branch protection rules?

Yes, you can automate merging multiple pull requests while enforcing branch protection rules. This skill evaluates each PR's readiness gates, merges only approved and fully green PRs, and clearly lists skipped PRs and the specific reasons they were blocked.

What is needed to load pull request context before automating a GitHub merge?

Loading pull request context requires deterministic PR context output from a specified load-issue script. If the script output is unavailable, the skill can fall back to GitHub MCP to load the necessary PR data for merge automation.

How do I automatically delete a GitHub branch after a pull request is merged?

To automatically delete a GitHub branch after a pull request is merged, this skill verifies merge success and cleans up the merged branch when configured. It performs this operational cleanup only after confirming the PR was successfully merged.

Why does my automated pull request merge get blocked when CI is failing?

Your automated pull request merge gets blocked when CI is failing because this skill enforces conflict and protection rules. It never merges when CI checks fail, conflicts exist, or required approvals and branch sync conditions are not satisfied.