merge-pr

Merge prepared GitHub PRs via squash with safety checks and cleanup.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the end-to-end workflow for merging a prepared GitHub PR using a deterministic squash merge, while enforcing safety checks and post-merge cleanup.

Core Features & Use Cases

  • Deterministic squash merges: Merge with a fixed head commit to avoid head drift.
  • Safety rails: Validate PR state, ensure no pushes to main, and perform worktree cleanup only after success.
  • Structured auditing: Record merge metadata, author and reviewer trailers, and post a PR comment with results.
  • Use Case: Teams using GitHub PR workflows want a repeatable, auditable merge step integrated into their automation.

Quick Start

Run the merge-pr workflow after a PR has been prepared to merge it into the main branch while preserving proper history and 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 GitHub PR squash merge safely?

To automate a GitHub PR squash merge safely, use a workflow that validates PR state, enforces no direct pushes to main, applies a deterministic head commit, and cleans up worktrees only after a successful merge.

What is a deterministic squash merge and why use it for GitHub PRs?

A deterministic squash merge fixes a specific head commit before merging to prevent head drift during the GitHub PR process. This approach ensures history is predictable, auditable, and safe from concurrent changes.

Can I enforce safety checks and PR state validation before merging a GitHub pull request?

Yes, you can enforce safety by validating the PR state and blocking direct pushes to main before merging a GitHub pull request. This ensures only reviewed, prepared PRs are merged into the target branch.

How do I add structured auditing and metadata to a squash-merged GitHub PR?

To add structured auditing to a squash-merged GitHub PR, record merge metadata, author and reviewer trailers, and post an informative PR comment with the merge results directly to the pull request thread.

Does merge-pr handle worktree cleanup if the GitHub PR merge fails?

No, worktree cleanup is performed only after a successful GitHub PR merge. This safety rail ensures that worktrees are preserved if the squash merge fails or the PR state validation does not pass.

What is the best way to integrate a repeatable, auditable PR merge step into GitHub automation?

The best way to integrate an auditable PR merge step into GitHub automation is using a deterministic squash merge workflow that records metadata, enforces PR state checks, and posts results as a PR comment.