stacked-diffs

Divide large code changes into sequential dependent pull requests using Git and GitHub CLI.

1|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/rarestg/rarestg-skills --skill stacked-diffs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stacked-diffs
Source: https://github.com/rarestg/rarestg-skills/tree/main/skills/stacked-diffs
Command: npx skills add https://github.com/rarestg/rarestg-skills --skill stacked-diffs

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps manage large code changes by breaking them down into smaller, more manageable, and reviewable pull requests, improving code quality and review efficiency.

Core Features & Use Cases

  • Sequential PR Creation: Guides the user through creating a series of dependent pull requests, each representing a single logical step.
  • Git Workflow Management: Utilizes vanilla git commands and the GitHub CLI (gh) for branching, committing, and PR creation.
  • Use Case: When implementing a new feature that involves multiple distinct stages (e.g., data model, API endpoint, UI integration), this skill ensures each stage is reviewed and merged independently.

Quick Start

Use the stacked-diffs skill to break down the current feature into a series of small, stacked PRs.

Frequently Asked Questions about stacked-diffs

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

FAQPage Schema
How do I break large code changes into small pull requests?

To break large code changes into small pull requests, you divide modifications into a sequence of small, interdependent PRs representing single logical steps. This approach improves code quality and review efficiency for incremental integration.

What is a stacked diff workflow in Git?

A stacked diff workflow in Git creates a series of dependent pull requests, where each PR represents a single logical step of a larger feature. It enforces a bottom-up merging strategy for clarity and maintainability.

Do I need the GitHub CLI to create stacked pull requests?

Yes, you need the GitHub CLI (`gh`) installed to create stacked pull requests using this workflow. The process utilizes vanilla git commands alongside `gh` for branching, committing, and sequential PR creation.

When should I use a stacked PR workflow for refactoring?

Use a stacked PR workflow for refactoring or feature development when changes require incremental review and integration across multiple distinct stages, such as data models, API endpoints, and UI integration.

How do I manage merging stacked pull requests?

Manage merging stacked pull requests by enforcing a bottom-up merging strategy. Each dependent pull request is reviewed and merged independently from the base up, ensuring clarity and maintainability of the sequence.