merge-pr

Merge GitHub pull requests via squash after validating pre-merge checks.

Updated Feb 18, 2026
One-click install
npx skills add https://github.com/loveoplay2023-hue/OpenMehdi --skill merge-pr-loveoplay2023-hue
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: merge-pr
Source: https://github.com/loveoplay2023-hue/OpenMehdi/tree/main/.agents/archive/merge-pr-v1
Command: npx skills add https://github.com/loveoplay2023-hue/OpenMehdi --skill merge-pr-loveoplay2023-hue

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the process of merging prepared GitHub Pull Requests (PRs) using a squash merge strategy, ensuring a clean commit history and proper attribution.

Core Features & Use Cases

  • Automated Squash Merging: Merges PRs with a squash strategy, incorporating co-author trailers.
  • Pre-Merge Validation: Checks PR status, required checks, and branch alignment before merging.
  • Worktree Isolation: Performs all merge operations within an isolated worktree for safety.
  • Post-Merge Cleanup: Cleans up worktrees and temporary branches upon successful merge.
  • Use Case: After a PR has been reviewed and prepared, use this skill to automatically merge it into the main branch, leaving a clear audit trail and freeing up the developer's time.

Quick Start

Use the merge-pr skill to merge pull request number 123.

Frequently Asked Questions about merge-pr

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

FAQPage Schema
How do I automatically merge a GitHub pull request using a squash strategy?

To automatically squash merge a GitHub pull request, you can use a tool that validates pre-merge checks and head commit SHA before merging the PR. This ensures a clean commit history with proper attribution.

Does merging a GitHub PR via squash require the gh CLI and git?

Yes, merging a GitHub PR via squash requires both the gh CLI and git. The process utilizes a dedicated worktree for operations, validates the head commit SHA, and cleans up local branches post-merge.

What is the best way to ensure a clean commit history when merging a GitHub PR?

The best way to ensure a clean commit history when merging a GitHub PR is to use a squash merge strategy. This approach incorporates co-author trailers and leaves a clear audit trail after merging.

Can I validate GitHub PR status and required checks before merging?

Yes, you can validate GitHub PR status and required checks before merging. The process checks PR status, required checks, and branch alignment before proceeding with the squash merge.

How does worktree isolation work when merging a GitHub pull request?

Worktree isolation when merging a GitHub pull request performs all merge operations within an isolated worktree for safety. Upon successful merge, it cleans up worktrees and temporary branches automatically.

Why should I use an automated squash merge for my GitHub pull requests?

You should use an automated squash merge for GitHub pull requests to free up developer time and ensure proper attribution. It automatically merges reviewed PRs, leaving a clear audit trail and clean commit history.