merge-pr

Merge a prepared GitHub PR via squash and clean up the worktree.

109|11|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/TermiX-official/cryptoclaw --skill merge-pr-termix-official
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: merge-pr
Source: https://github.com/TermiX-official/cryptoclaw/tree/main/.agents/skills/merge-pr
Command: npx skills add https://github.com/TermiX-official/cryptoclaw --skill merge-pr-termix-official

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates merging a prepared GitHub PR via squash while enforcing safety constraints, preventing pushes to main and ensuring clean worktrees after success.

Core Features & Use Cases

  • Squash-merge: Merge a PR with a squash strategy and record the merge commit.
  • Safety & Compliance: Enforces that no pushes to main occur and requires a correct, prepared PR state.
  • Worktree Cleanup: Cleans up the isolated git worktree after a successful merge.
  • Use Case: When a reviewer marks a PR as ready, run the merge-pr workflow to finalize the merge and tidy up resources without manual git housekeeping.

Quick Start

Use the merge-pr skill after you have a prepared PR. Run the prepared-pr workflow and then execute the merge using gh pr merge --squash --delete-branch on the PR in question.

Frequently Asked Questions about merge-pr

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

FAQPage Schema
How do I squash-merge a GitHub PR and clean up the worktree automatically?

Squash-merging a GitHub PR is automated by running a workflow that executes gh pr merge --squash --delete-branch, enforcing the MERGED state and performing post-merge git worktree cleanup automatically.

What is the safest way to merge a prepared GitHub PR without pushing directly to main?

Squash-merging a prepared GitHub PR via a controlled worktree workflow prevents direct pushes to main, enforcing safety constraints while finalizing the merge and cleaning up the isolated worktree automatically.

Do I need the GitHub CLI to automate a squash merge for my PR?

Automating a PR squash merge requires the GitHub CLI (gh) and git, along with repository access, to execute the merge and enforce post-merge worktree cleanup.

Can I automate git worktree cleanup after a successful PR squash merge?

Automating git worktree cleanup after a PR squash merge is supported by enforcing the PR state to MERGED and then automatically cleaning up the isolated worktree resources.

When should I use a squash merge strategy for my GitHub PR?

A squash merge strategy for a GitHub PR is used when a reviewer marks it as ready, recording a single merge commit while preventing unwanted commits on the main branch.