merge-pr

Merge prepared GitHub pull requests via squash after validation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the process of merging prepared GitHub Pull Requests (PRs) by squashing them, ensuring a clean commit history and efficient integration of changes.

Core Features & Use Cases

  • Automated Merging: Merges PRs using gh pr merge --squash after necessary checks.
  • Branch Cleanup: Automatically deletes the source branch upon successful merge.
  • Worktree Isolation: Performs all operations within an isolated worktree to prevent interference with the main repository.
  • Use Case: After a PR has been reviewed and prepared for merging, use this skill to finalize the integration into the main branch without manual intervention, ensuring all checks pass and the PR is correctly marked as merged.

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

To squash and merge a GitHub pull request automatically, this Skill executes `gh pr merge --squash` after validating that the PR is not a draft, all checks are green, and the branch is current with main.

What checks are required before merging a pull request via squash?

Before merging a pull request via squash, the Skill verifies the PR is not a draft, confirms all status checks are green, and ensures the branch is not behind main to prevent incomplete integrations.

Can I automate GitHub PR branch cleanup after a successful squash merge?

Yes, you can automate GitHub PR branch cleanup after a squash merge because this Skill automatically deletes the source branch upon successful integration and cleans up isolated worktrees.

How does worktree isolation work when merging a GitHub pull request?

Worktree isolation works by performing all merge preparations and validation checks within a separate git worktree, preventing interference with your main repository during the pull request integration.

Why does my GitHub pull request show as closed instead of merged?

A GitHub pull request shows as closed instead of merged if the validation fails. This Skill verifies the final PR state is strictly MERGED, never CLOSED, ensuring the squash merge executed correctly.