merge-pr

Merge prepared GitHub PRs with squash commits and cleanup.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the safe, deterministic merging of prepared GitHub pull requests, preventing unsafe pushes to main and ensuring post-merge cleanup of worktrees.

Core Features & Use Cases

  • Deterministic squash merges using --match-head-commit
  • Validation of PR head SHA and final MERGED state
  • Post-merge cleanup of worktrees and branches
  • Automated commit message with Co-authored-by trailers and reviewer tag
  • PR comment with merge summary

Quick Start

Run the merge-pr command after preparing a PR with /prepare-pr to complete the end-to-end merge workflow.

Frequently Asked Questions about merge-pr

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

FAQPage Schema
How do I automate a safe squash merge for a prepared GitHub PR?▼

To automate a safe squash merge for a prepared GitHub PR, this Skill validates the head commit, applies the merge deterministically using --match-head-commit, and deletes the branch post-merge. It records the merge SHA and posts a confirmation comment with author and reviewer trailers.

What is the best way to prevent unsafe pushes to main during a PR merge?▼

The best way to prevent unsafe pushes to main during a PR merge is to enforce a deterministic squash merge workflow. This Skill applies head-commit validation and executes the merge only after confirming the final MERGED state, ensuring the main branch remains stable.

How do I clean up local worktrees and branches after merging a pull request?▼

To clean up local worktrees and branches after merging a pull request, this Skill uses the --delete-branch flag during the squash merge process. It automatically handles the post-merge cleanup, preventing stale worktrees from accumulating.

Does the squash merge automatically include co-author and reviewer information?▼

Yes, the squash merge automatically includes co-author and reviewer information. This Skill generates an automated commit message with Co-authored-by trailers and a reviewer tag, and posts a PR comment containing the full merge summary.

What preparations are needed before running an automated PR merge command?▼

Before running an automated PR merge command, you need to prepare your PR using a preparatory review process that uses local worktrees. The Skill enforces head-commit validation and checks against the prepared state to ensure a safe, deterministic merge.

Why should I use --match-head-commit when merging a GitHub pull request?▼

You should use --match-head-commit when merging a GitHub pull request to guarantee the exact reviewed commit is merged. This prevents race conditions where new commits are pushed mid-merge, ensuring the final MERGED state matches the validated head SHA.