github-merge-stack

Merge stacked pull requests into main with squash merges.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Merges stacked feature branches from Ralph into main while preserving the visibility of each feature's history across multiple PRs.

Core Features & Use Cases

  • Sequential squash-merges of stacked PRs into main to maintain a clean, understandable history.
  • Automatic base updates when needed, optional dry-run previews, and post-merge branch cleanup.
  • Provides a clear audit trail by preserving PR descriptions and rationale in commit messages.

Quick Start

Run this skill to merge all Ralph-created stacked PRs into main and delete merged branches.

Frequently Asked Questions about github-merge-stack

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

FAQPage Schema
How do I merge stacked pull requests into main while preserving full feature history?

Merge stacked pull requests into main by sequentially squash-merging each PR, which preserves the visibility of each feature's history and rationale in the commit messages. This maintains a clean, understandable main branch history across multiple dependent PRs.

Can I preview a stacked PR merge before it actually happens?

Yes, you can preview a stacked PR merge by using the optional --dry-run mode. This allows you to simulate the sequential squash merges and automatic base updates into main without applying actual changes or deleting branches.

Do I need the GitHub CLI authenticated to merge stacked branches?

Yes, merging stacked branches depends on the GitHub CLI (gh) being authenticated. You also need open pull requests targeting main and the necessary repository permissions to perform squash merges and branch deletion.

How does automatic base updating work for sequential pull requests?

Automatic base updates occur during the sequential merge process to ensure each stacked PR targets the correct branch state. This ensures dependent pull requests merge cleanly into main without manual rebase intervention.

Can I prevent branch cleanup after merging stacked PRs?

Yes, you can prevent post-merge branch cleanup by running the merge with the --no-cleanup mode. This leaves the merged feature branches intact while still performing the sequential squash merges into main.