gt-stack-split
Installation
SKILL.md
Split Large Changes into a Graphite Stack
Break down a large diff into a stack of small, reviewable Graphite branches. Each branch builds incrementally toward the final result so the complete stack, when merged, produces the exact same diff as the original change.
When to Use
Invoke this skill when you have a large change — uncommitted, staged, or already committed on a branch — that should be split into a clean stack of PRs for easier review. The user will specify the base to compare against (usually main).
Core Principles
- Diff integrity — The diff from
mainto the top-most branch must be identical to the original change. Total additions, deletions, and file changes are preserved exactly. - Incremental buildability — Every branch in the stack must compile/type-check on its own. No broken imports, missing types, or dangling references.
- Progressive file construction — Files (source and tests) can be introduced partially in an early branch with
// TODO(mingchungx): <what goes here next>placeholders. Later branches fill in those placeholders and remove the TODO comments. - Small, coherent diffs — Each branch should represent one logical chunk: a new type, a utility, a component, a test suite, a wiring layer, etc. Aim for diffs that are quick to review.
- Meaningful, numbered branch names — Every branch name must clearly describe what it introduces and end with a stack position suffix (
-01,-02,-03, etc.). Example:mingchungx/add-billing-types-01,mingchungx/implement-usage-tracker-02.
Workflow
1. Analyze the change
Related skills