gh_pr_merge

Automate GitHub pull request merges after passing checks with squash merges.

1|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/acartine/osterman --skill gh-pr-merge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh_pr_merge
Source: https://github.com/acartine/osterman/tree/main/skills/gh_pr_merge
Command: npx skills add https://github.com/acartine/osterman --skill gh-pr-merge

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automatically merges GitHub PRs only after all required checks pass, reducing risk of faulty merges.

Core Features & Use Cases

  • Enforces green checks before merging.
  • Performs squash merges by default for clean history.
  • Post-merge notes (changelog, release triggers) and follow-up tasks.

Quick Start

Instruct the agent to perform a squash-merge of a PR that has all checks green.

Frequently Asked Questions about gh_pr_merge

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

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

Automating a GitHub pull request merge requires enforcing green CI checks before allowing the action. This automation verifies all required checks pass, then performs a safe squash merge to ensure a clean commit history and reduce the risk of faulty merges.

How does a squash merge strategy keep my GitHub repository history clean?

A squash merge strategy keeps GitHub repository history clean by combining all pull request commits into a single commit on the target branch. This automation applies squash merges by default, ensuring linear project progression without cluttering the main branch.

Can I trigger post-merge tasks like changelog updates automatically after a PR merge?

Yes, you can trigger post-merge tasks like changelog updates automatically after a PR merge. This automation handles post-merge notes and follow-up tasks, including release triggers, immediately after the squash merge completes successfully.

What is the best way to prevent faulty merges when automating GitHub PR workflows?

The best way to prevent faulty merges in automated GitHub PR workflows is enforcing green checks before any merge action occurs. This automation blocks merging unless all required CI checks pass, ensuring only verified code is integrated into the repository.

Does this automated PR merge approach support optional review steps before the final squash merge?

Yes, this automated PR merge approach supports optional review steps before the final squash merge. It integrates optional review checks alongside mandatory CI green checks to satisfy repository requirements before completing the end-to-end merge process.