merge-pr

Merge approved GitHub pull requests with passing CI checks.

5|Updated Jul 25, 2025
One-click install
npx skills add https://github.com/tomzx/agents --skill merge-pr-tomzx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: merge-pr
Source: https://github.com/tomzx/agents/tree/main/skills/merge-pr
Command: npx skills add https://github.com/tomzx/agents --skill merge-pr-tomzx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Checks that a pull request is approved and CI checks are passing before merging, preventing unreviewed or failing changes from entering the main branch.

Core Features & Use Cases

  • Approval validation: ensures at least one reviewer has approved and no changes requested.
  • CI validation: requires all required status checks to pass before merging.
  • Merge and cleanup: merges the PR (default squash) and deletes the remote branch, ensuring a clean history.
  • Safeguard checks: verifies linked issues are closed when applicable and provides a clear merge report.

Quick Start

Merge a PR by referencing its number once approvals and CI are green.

Frequently Asked Questions about merge-pr

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

FAQPage Schema
How do I automate pull request merges after CI checks and approvals pass?

Automating pull request merges involves validating reviewer approvals and verifying all required CI status checks pass before merging. This Skill performs squash merges by default, deletes the remote branch, and reports results to ensure a clean history.

What is the safest way to merge a GitHub pull request only when CI is green?

The safest way to merge a pull request when CI is green is to enforce automated checks for at least one approval and no requested changes. This Skill validates required status checks, executes a squash merge, and cleans up the remote branch.

How to prevent unreviewed or failing code changes from entering the main branch?

Preventing unreviewed or failing changes from entering the main branch requires automated approval validation and CI status verification. This Skill blocks merges if changes are requested or if required status checks fail, ensuring branch integrity.

Does automated PR merging delete the remote branch after a squash merge?

Yes, automated PR merging deletes the remote branch after completing a squash merge. This cleanup step ensures a clean git history and removes obsolete branches once the pull request is successfully merged.

Can I verify linked issues are closed before merging a pull request automatically?

Yes, you can verify linked issues are closed when applicable before merging a pull request. This Skill includes safeguard checks that confirm issue closure and provide a clear merge report upon completion.

What happens if a pull request has no approvals during automated merge validation?

If a pull request has no approvals during automated merge validation, the merge is blocked. This Skill requires at least one reviewer approval and zero requested changes to proceed with the squash merge.