← ClaudeAtlas

stacked-prslisted

Manage a stack of dependent pull requests (a chain where each PR's base is the branch below it, up to main). Covers GitHub's native stacked pull requests via the gh stack CLI extension, and hand-rolled stacks built with plain git + gh. Use when creating or planning a stack of dependent PRs, merging the bottom of a stack, retargeting a PR's base to main, propagating main or a review fix up a chain of branches, rebasing or restructuring a stack, resolving conflicts across a PR stack, or recovering a stacked PR that was auto-closed when its base branch was deleted.
magnusrodseth/dotfiles · ★ 2 · AI & Automation · score 65
Install: claude install-skill magnusrodseth/dotfiles
# Stacked PRs A **stack** is a chain of PRs where each PR's base branch is the **head** branch of the one below it, down to a PR whose base is the **trunk** (usually `main`): ``` main ← A (branch a) ← B (branch b) ← C (branch c) PR #A PR #B PR #C base: main base: a base: b bottom top ``` Each PR's diff shows only **its own layer** because it is compared against the branch below. The bottom is closest to trunk; the top is furthest. Foundational work (schema, shared types) goes low; things that depend on it (API routes, UI) go high. The invariant: **if code in one layer depends on code in another, the dependency must live in the same branch or a lower one.** ## Route first: native stack or hand-rolled chain GitHub shipped **native stacked pull requests** on 30.07.2026 (public preview, rolling out to all repos). A native stack is a first-class object on GitHub with its own number, a stack map in the merge box, webhook/REST/GraphQL surface, and server-side cascading rebase. A hand-rolled chain is just a set of PRs whose bases happen to point at each other; GitHub has no idea they are related. **They behave differently in ways that will bite. Establish which one you have before touching anything.** ```bash # 1. Is the CLI extension available locally? gh extension list | grep gh-stack # 2. Is this PR part of a native stack? `null` means it is not. gh api repos/<owner>/<repo>/pu