merge-pr

Squash merge GitHub pull requests with co-author trailers and worktree cleanup.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/xxrenzhe/autobb --skill merge-pr-xxrenzhe
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: merge-pr
Source: https://github.com/xxrenzhe/autobb/tree/main/openclaw/.agents/archive/merge-pr-v1
Command: npx skills add https://github.com/xxrenzhe/autobb --skill merge-pr-xxrenzhe

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill automates the process of merging a GitHub Pull Request (PR) via a squash merge, ensuring that all necessary checks are passed and the worktree is cleaned up afterward.

Core Features & Use Cases

  • Automated Squash Merging: Merges PRs using gh pr merge --squash with explicit co-author attribution.
  • Pre-Merge Validation: Verifies PR state, checks for passing required GitHub Actions, and ensures the branch is not behind main.
  • Worktree Management: Uses an isolated worktree for merge operations and cleans it up upon successful merge.
  • Use Case: After a PR has been reviewed and prepared for merging, this Skill can be invoked to complete the merge process without manual intervention, leaving behind a clean Git history and a merged PR.

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 automate squash merging a GitHub PR after it has been reviewed?▼

To automate squash merging a GitHub PR, you can use a tool that executes the `gh pr merge --squash` command. This skill validates the PR state, checks required GitHub Actions, and performs the merge with explicit co-author trailers.

What checks are needed before performing a safe squash merge on a GitHub pull request?▼

Before performing a safe squash merge, the PR must be in a valid state, required GitHub Actions must pass, and the branch must not be behind `main`. This skill automatically verifies these branch protections before merging.

Does this automated PR merge tool clean up Git worktrees after the merge is complete?▼

Yes, this automated PR merge tool uses an isolated worktree for the merge operation and cleans it up automatically upon successful completion. This leaves behind a clean Git history and a merged PR.

How does a squash merge handle co-author attribution in GitHub commit history?▼

A squash merge handles co-author attribution by adding explicit co-author trailers to the commit. This ensures all contributors are properly credited in the Git history while maintaining a clean, single-commit log.

Can I use this squash merge automation if my GitHub branch is behind the main branch?▼

No, you cannot use this automation if your branch is behind `main`. The skill validates pre-merge status and ensures the branch is up to date before performing the deterministic squash merge to prevent behind-target issues.

Why does my GitHub PR fail to reach a MERGED state after running an automated merge script?▼

Your GitHub PR may fail to reach a MERGED state if required GitHub Actions are failing or branch protections are not met. This skill validates these conditions beforehand to ensure the PR ends in a MERGED state.