merge

Squash-merges pull requests and deletes branches after verifying CI and acceptance criteria.

3|1|Updated Feb 28, 2026
One-click install
npx skills add https://github.com/auerbachb/claude-code-config --skill merge-auerbachb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: merge
Source: https://github.com/auerbachb/claude-code-config/tree/main/.claude/skills/merge
Command: npx skills add https://github.com/auerbachb/claude-code-config --skill merge-auerbachb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the finalization of a pull request by verifying the repository's merge gate and acceptance criteria, ensuring CI is green, performing a squash merge, cleaning up branches, syncing main, and recording the result in the work-log so developers don't have to perform error-prone manual steps.

Core Features & Use Cases

  • Merge gate verification: Runs the authoritative merge-gate checks (reviews, Greptile/BugBot findings, CI, and behind checks) before allowing a merge.
  • Acceptance criteria enforcement: Extracts and verifies Test Plan checkboxes, ticks passing items, and prevents merging if any required AC is unchecked.
  • Safe merge and cleanup: Performs a squash merge, deletes local and remote branches with worktree detection, updates local main, counts review cycles, and appends a standardized entry to the work-log.
  • Use case: Quickly finalize a PR during an active development session while guaranteeing AC, CI, and repository hygiene are satisfied.

Quick Start

Run the merge skill to verify the PR gate and acceptance criteria, squash-merge the PR, delete the branch, sync main, and append a work-log entry.

Frequently Asked Questions about merge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I squash-merge a pull request and delete the branch automatically?

To squash-merge a pull request and delete the branch, this automation verifies CI status and acceptance criteria, performs the squash merge via GitHub CLI, removes the local and remote feature branches, and syncs main.

Can I enforce acceptance criteria checks before merging a GitHub pull request?

Yes, you can enforce acceptance criteria before merging by parsing the pull request's Test Plan checkboxes, verifying required items are checked, and blocking the squash merge if any mandatory criteria remain unchecked.

What is a merge gate and how does it work with CI status?

A merge gate is a pre-merge validation process that checks CI status, code reviews, and bot findings; this automation runs these authoritative repository helper scripts to ensure all gate checks pass before finalizing a pull request.

Does this squash-merge process handle worktree detection during branch cleanup?

Yes, the branch cleanup process includes worktree detection to safely delete local and remote feature branches after a squash merge, preventing conflicts with active Git worktrees during repository synchronization.

How do I record a completed pull request merge in a work-log?

To record a completed pull request merge in a work-log, the automation appends a standardized entry after the squash merge, capturing review cycle counts, acceptance criteria status, and branch cleanup results.

What happens if CI is failing when I try to squash-merge a PR?

If CI is failing, the merge gate verification blocks the squash-merge process to prevent finalizing incomplete work, ensuring only pull requests with green CI status and fully checked acceptance criteria are merged.