merge-pr

Squash merge GitHub Pull Requests and clean up the worktree.

Updated Feb 8, 2026
One-click install
npx skills add https://github.com/dioerden/OpenClaw-Flash-Vault --skill merge-pr-dioerden
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: merge-pr
Source: https://github.com/dioerden/OpenClaw-Flash-Vault/tree/main/.agents/skills/merge-pr
Command: npx skills add https://github.com/dioerden/OpenClaw-Flash-Vault --skill merge-pr-dioerden

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gh, and includes scripts (resource) components.

What problem does it solve?

This Skill automates the process of merging GitHub Pull Requests (PRs) using the squash merge strategy, streamlining the workflow and ensuring a clean merge with minimal manual intervention.

Core Features & Use Cases

  • Automated Squash Merge: Executes gh pr merge --squash to merge PRs automatically.
  • Worktree Cleanup: Ensures the worktree is cleaned up after a successful merge.
  • Safety Checks: Includes safety checks to ensure the PR is ready for merge and the branch is up-to-date.
  • Use Case: Ideal for developers who frequently merge PRs and want to reduce manual steps and potential errors.

Quick Start

Run the merge-pr skill with the PR number or URL to automatically merge the PR and clean up the worktree.

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 PR?

This Skill automates the squash merge of GitHub Pull Requests by executing `gh pr merge --squash`, performing safety checks to ensure the PR is ready and up-to-date, and cleaning up the worktree afterward.

Do I need the GitHub CLI installed to merge a PR with squash?

Yes, you need the GitHub CLI (`gh`) installed and appropriate repository permissions. The Skill relies on `gh` to execute the squash merge command and manage the resulting worktree cleanup.

What is the best way to ensure a clean worktree after merging a PR?

Using an automated squash merge process that includes worktree cleanup as a post-merge step is the best way to ensure a clean worktree. This approach removes stale local branches and synchronizes the repository state.

Can I merge a GitHub PR if the branch is not up to date?

No, you should not merge a GitHub PR if the branch is not up-to-date. This automation includes safety checks to verify the PR is ready and the branch is current before executing the squash merge.

Does squash merging automatically clean up the local worktree?

Squash merging via `gh pr merge --squash` does not inherently clean up the local worktree. This automation specifically adds a worktree cleanup step that runs immediately after the successful GitHub PR merge.