stacklisted
Install: claude install-skill XingLiu0923/pr-stack-skill
# Stacked pull requests with `gh stack`
A **stack** is an ordered chain of branches rooted on a trunk, where each branch
has one PR based on the branch below it, so a reviewer sees only that layer's
diff. GitHub prints a stack trunk-first, left to right:
```
(main) <- auth <- api <- frontend
```
Left is the **bottom** (merges first), right is the **top**. `up` moves away
from trunk, `down` moves toward it.
## What this skill is for
`gh stack` ships its **own** agent skill, and it is the authority on the command
surface — flags, JSON schema, exit codes, stack design, troubleshooting. Do not
restate it and do not guess at flags; run `gh stack <command> --help`, which is
authoritative, or read the reference files that ship with the extension.
This skill covers what that one does not:
1. **Preflight** — whether stacked PRs work here *before* you run anything.
2. **The blocked-command contract** — this plugin denies commands at the tool
layer, and you need to know which, and what to run instead.
3. **Splitting an existing oversized branch**, which GitHub explicitly declines
to cover. See `pr-stack:split-pr`.
## Preflight — required before any stack command
```bash
bash "${CLAUDE_PLUGIN_ROOT}/scripts/check-status.sh"
```
Six lines. Stop and act on these:
| Line | Action |
| --- | --- |
| `gh=NOT installed` / `ext=NOT installed` / `auth=NOT authenticated` | Stop. Load **pr-stack:stack-setup**. |
| `repo=NOT a git repository` | Stop. Read-only questions are fine; rep