gh-stack
Installation
SKILL.md
GitHub Stacked PRs
Use gh stack to turn one coherent change into an ordered chain of small pull requests. Each branch
has one PR based on the branch below it, so each review shows only that layer's focused diff.
gh stack prints trunk first:
(main) <- auth <- api <- frontend
Left is the bottom and merges first. Right is the top and merges last. up moves away from
trunk; down moves toward it. Foundational work belongs below the code that depends on it.
When to use
Use a stack when one outcome contains dependent concerns that are easier to review separately. Use a single ordinary PR when the change is already focused and independently reviewable. Use separate stacks for unrelated work or parallel changes without a dependency chain.