merge-pr

Merge GitHub pull requests via squash with co-author attribution and cleanup.

1|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/lachlanchen/LazyingArtBot --skill merge-pr-lachlanchen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: merge-pr
Source: https://github.com/lachlanchen/LazyingArtBot/tree/main/.agents/archive/merge-pr-v1
Command: npx skills add https://github.com/lachlanchen/LazyingArtBot --skill merge-pr-lachlanchen

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

  • Deterministic Squash Merging: Merges PRs using --match-head-commit to prevent race conditions and ensures a specific co-author trailer is added.
  • Automated Cleanup: Removes worktrees and temporary branches after a successful merge.
  • Use Case: After a PR has been reviewed and prepared for merging, use this Skill to finalize the merge into the main branch without manual intervention, while maintaining a clear audit trail.

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 squash merge a GitHub PR while avoiding race conditions?

Squash merging a GitHub PR safely requires validating CI statuses and using the --match-head-commit flag to prevent race conditions, ensuring the merged commit matches the reviewed state.

What is the best way to automate PR squash merging and clean up worktrees afterwards?

Automating PR squash merging involves validating the branch is not behind main, executing the merge with specific co-author attribution, and automatically removing temporary worktrees and branches post-merge.

Does squash merging a GitHub PR validate required CI statuses before executing?

Yes, validating required CI statuses is a necessary step before squash merging a GitHub PR to ensure all checks pass and the branch is not behind the main branch.

Can I apply co-author attribution automatically when I squash merge a pull request?

Yes, you can apply specific co-author trailers automatically during a squash merge to maintain a clear audit trail and accurately attribute contributions in the commit history.

Why does my PR squash merge fail when the branch is behind main?

A PR squash merge fails when the branch is behind main because validating that the branch is up-to-date is required to prevent missing recent changes and breaking the main branch.