merge-pr

Squash merge prepared GitHub PRs with head-commit verification and worktree cleanup.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Merges prepared GitHub pull requests deterministically using squash, while avoiding pushes to main and ensuring proper cleanup after a successful merge.

Core Features & Use Cases

  • Deterministic squash merges with explicit head commit verification and preservation of author metadata.
  • Safety checks including PR readiness, draft status, required checks, and clean worktree cleanup to prevent stale state.
  • Use cases include maintaining a clean main history, enforcing review discipline, and speeding up maintainer workflows with guaranteed merge outcomes.

Quick Start

Request a squash merge of a prepared PR using the defined safeguards and post-merge cleanup.

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?

Automating a safe squash merge requires verifying PR readiness, draft status, and required checks before merging. This process enforces a strict MERGED state, records the merge SHA, and executes worktree cleanup only after a successful merge to prevent stale state.

What is the best way to prevent stale worktrees when merging pull requests?

Preventing stale worktrees during pull request merges requires automated cleanup tied to a verified merge state. By enforcing strict safety checks and only removing the worktree after a successful squash merge, you guarantee no stale local state remains.

How does head commit verification work during a GitHub squash merge?

Head commit verification during a GitHub squash merge validates the exact commit being merged before execution. This deterministic approach preserves author metadata and ensures the merge SHA is explicitly recorded, preventing unintended commits from entering the main branch.

Can I enforce review discipline and required checks before merging a PR automatically?

Enforcing review discipline and required checks before an automated PR merge involves validating draft status and check readiness. This guarantees merges only proceed when the pull request meets strict maintainer workflow requirements, avoiding premature pushes to main.

Why should I use a deterministic squash merge for maintainer workflows?

Using a deterministic squash merge for maintainer workflows ensures a clean main history by collapsing commits into a single verified entry. It speeds up merging by guaranteeing explicit outcomes and automating post-merge worktree cleanup.

Are there limitations to automating GitHub PR merges with strict safety checks?

Limitations to automating GitHub PR merges with strict safety checks include the requirement for prepared pull requests. The process will halt if required checks fail, draft status is active, or the head commit verification fails, preventing the merge from proceeding.