merge-pr

Merge GitHub pull requests via squash after validating checks and branch status.

4|2|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/Clawdi-AI/openclaw --skill merge-pr-clawdi-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: merge-pr
Source: https://github.com/Clawdi-AI/openclaw/tree/main/.agents/archive/merge-pr-v1
Command: npx skills add https://github.com/Clawdi-AI/openclaw --skill merge-pr-clawdi-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (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 and controlled integration into the main branch.

Core Features & Use Cases

  • Deterministic Squash Merges: Merges PRs using gh pr merge --squash with specific commit matching to prevent race conditions.
  • Automated Cleanup: Removes worktrees and temporary branches after a successful merge.
  • Safety Guardrails: Includes checks for PR status, branch alignment, and required CI checks before merging.
  • Use Case: After a PR has been reviewed and prepared for merging, this Skill can be invoked to finalize the merge process without manual intervention, ensuring all checks pass and the branch is cleaned up.

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 a squash merge for a GitHub pull request?

Automating a squash merge for a GitHub pull request requires a tool that runs `gh pr merge --squash` with specific commit matching. This skill performs that deterministic merge after verifying the PR is not a draft and all required checks pass.

What safety checks are needed before merging a pull request via squash?

Before merging a pull request via squash, you must verify the PR is not a draft, confirm all required CI checks have passed, and ensure the branch is up-to-date with main. This skill validates all these conditions before proceeding.

How do I clean up worktrees and temporary branches after a PR merge?

Cleaning up worktrees and temporary branches after a PR merge is handled automatically post-merge. This skill removes these artifacts once the squash merge succeeds, leaving the PR in a clean MERGED state without manual intervention.

Can I merge a draft GitHub PR automatically using a squash strategy?

You cannot merge a draft GitHub PR automatically using a squash strategy if safety guardrails are enforced. This skill explicitly checks for draft status and blocks the merge process if the PR is still marked as a draft.

Why does my automated GitHub PR merge fail due to branch alignment?

An automated GitHub PR merge fails due to branch alignment when the feature branch is not up-to-date with the main branch. This skill enforces branch alignment validation prior to merging to prevent conflicts during the squash merge.

Does the merge-pr skill handle race conditions during GitHub squash merges?

The merge-pr skill handles race conditions during GitHub squash merges by using `gh pr merge --squash` with specific commit matching. This deterministic approach ensures the exact reviewed commits are merged, preventing concurrent update conflicts.