← ClaudeAtlas

landing-stacked-github-prslisted

Unwind a chain of stacked PRs (each based on the previous PR's branch) and land them into the base branch (develop/main/master) one layer at a time, without needing a CI trigger allowlist for intermediate branches. Handles GitHub native stacks via the merge-async API. Triggers on: land the stack, unwind the stacked PRs, merge the PR stack into develop, retarget the stack to main, part of a stack, merge-async, auto-merge is not supported for stacked pull requests, fold the stack into its bottom PR.
sblattj/agent-chandlery · ★ 0 · Code & Development · score 72
Install: claude install-skill sblattj/agent-chandlery
## More triggers landing-stacked-prs (old name) # Landing stacked PRs into the base branch Use when several PRs are chained (PR N based on PR N-1's branch) and need to reach the real base branch. The key principle: **intermediate-branch CI is not the gate. The base branch's protection is.** So retarget each layer to the base just-in-time and let native CI validate it. Never rely on hardcoding intermediate branch names into CI triggers. Repo: pass `-R owner/repo` to `gh`, or run from the clone (`gh repo view --json nameWithOwner -q .nameWithOwner` resolves it). Below, `R` is that `owner/repo`. ## Principles - Merge order is dictated by real dependencies (content deps + files edited by more than one layer). Establish that order first; do not reorder to be convenient. - Only ever merge a layer **into the base branch**, one at a time. Never merge a child into its old prerequisite branch. - Before a layer's CI matters, merge current base into that layer so its diff collapses to only its own change and it sees everything already landed. - The tip branch contains every layer cumulatively; one CI run on the tip (retargeted to base) validates the whole assembled stack. Use it as an optional pre-flight. ## Step 0: establish order and detect conflicts Resolve the repo's real base (default branch from the git remote, e.g. `develop` or `main`; the user's agent instructions file (AGENTS.md / CLAUDE.md) may name known bases). For each PR, probe conflicts against the base, no