merge-pr

Squash merge a GitHub pull request after validation and worktree cleanup.

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

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 traceable commit history.

Core Features & Use Cases

  • Automated Squash Merging: Merges a PR after it has been prepared and reviewed, using a squash strategy.
  • Worktree Cleanup: Automatically cleans up the isolated worktree used for the merge operation upon successful completion.
  • Safety Guardrails: Implements strict checks to prevent accidental merges of draft PRs, ensure required checks have passed, and avoid pushing directly to main.
  • Use Case: After a colleague has prepared a PR for merging using the /prepare-pr skill, you can use this skill to finalize the merge, ensuring all safety checks are met and the worktree is cleaned up.

Quick Start

Use the merge-pr skill to merge the 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 automatically squash merge a GitHub pull request?

To automatically squash merge a GitHub pull request, you can trigger the merge-pr skill with the PR number. It validates checks, ensures the PR is not a draft, and executes the squash merge in an isolated worktree.

Can I automate squash merging draft pull requests on GitHub?

No, you cannot automate squash merging draft pull requests. The squash merge process includes safety guardrails that explicitly block draft PRs, require all checks to pass, and prevent direct pushes to main.

What is the safest way to merge a prepared GitHub PR via CI/CD?

The safest way to merge a prepared GitHub PR via CI/CD is using a dedicated worktree for the operation. This method verifies required checks have passed, confirms the branch is up-to-date with main, and cleans up the worktree after merging.

Does the automated squash merge process clean up Git worktrees?

Yes, the automated squash merge process cleans up the Git worktree. It uses a dedicated, isolated worktree specifically for the merge operation and automatically removes it upon successful completion.

Why does my GitHub pull request fail the automated squash merge?

Your GitHub pull request fails the automated squash merge if it is still a draft, required status checks have not passed, or the branch is not up-to-date with the main branch. The process enforces these strict checks before merging.

Do I need to prepare my GitHub pull request before squash merging?

Yes, you need to prepare your GitHub pull request before squash merging. The workflow expects the PR to be fully prepared and reviewed beforehand, ensuring all safety validations are met before the final merge execution.