merge-pr

Merge a GitHub Pull Request via squash and clean up worktrees.

Updated Jul 17, 2026
One-click install
npx skills add https://github.com/kolbick/Kolb-Bot --skill merge-pr-kolbick
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: merge-pr
Source: https://github.com/kolbick/Kolb-Bot/tree/main/.agents/skills/merge-pr
Command: npx skills add https://github.com/kolbick/Kolb-Bot --skill merge-pr-kolbick

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the process of merging a prepared GitHub Pull Request (PR) via squash, ensuring a clean merge and proper cleanup of worktrees.

Core Features & Use Cases

  • Automated Merging: Merges PRs using gh pr merge --squash.
  • Branch Cleanup: Automatically deletes the merged branch and cleans up local worktrees.
  • Safety Guardrails: Prevents direct pushes to main and ensures PRs end in a MERGED state.
  • Use Case: After a PR has been reviewed and prepared for merging, use this skill to complete the process without manual intervention, ensuring all checks pass and the branch is removed.

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

To automatically merge a GitHub pull request using squash, provide the PR number to execute `gh pr merge --squash`. This validates checks, ensures the PR ends in a MERGED state, and deletes the branch.

How does branch cleanup work after merging a GitHub PR?

Branch cleanup after merging a GitHub PR happens automatically via the `--delete-branch` flag. Once the squash merge succeeds and the PR reaches a MERGED state, the remote branch is deleted and local worktrees are cleaned up.

Can I use this to merge a pull request directly to the main branch?

You cannot use this to merge a pull request directly to the main branch. Safety guardrails prevent direct pushes to main, requiring standard pull request validation and checks to pass before executing the squash merge.

What do I need to provide to automate a pull request merge?

To automate a pull request merge, you need to provide the specific PR number. The process validates PR checks before executing the squash merge and branch cleanup to ensure safe completion.

Why does my GitHub PR merge fail when checks have not passed?

Your GitHub PR merge fails when checks have not passed because the process validates PR checks before executing. This safety guardrail ensures only reviewed and prepared PRs reach a MERGED state.