git-stacked-prs
БесплатноБез исполняемых скриптовНе проверенGitHub native stacked PRs via gh stack. Use when creating, syncing, rebasing or merging a PR stack, or choosing stacks vs manual PR chains.
от laurigates★ 61 звезда на GitHubОб этом скилле
GitHub Native Stacked PRs (gh stack)
GitHub has a first-party stacked-PR model: a chain of PRs registered with
GitHub, driven by the github/gh-stack CLI extension. A registered stack
behaves differently from the ad-hoc chain this plugin's other skills describe —
GitHub retargets, runs CI, and merges the stack itself.
Public preview. The feature and its CLI surface are subject to change. No repository or organization setting enables it; it is on by default.
When to Use This Skill
| Use this skill when... | Use something else when... |
|---|---|
Building a change as a registered gh stack |
Rebasing a plain feature branch → git-rebase-patterns |
| Deciding stack vs. ad-hoc PR chain | Merging one PR safely → git-merge-hazards |
| Merging or syncing a registered stack | Creating a single PR → git-pr |
| A repo's PRs show GitHub stack UI | Cross-fork contribution → git-upstream-pr (stacks are same-repo only) |
Registered stack vs. ad-hoc chain
Three hazards this plugin documents at length apply to ad-hoc chains (you
opened PR B with --base pointing at PR A's branch). A stack registered with
GitHub removes all three:
| Behaviour | Ad-hoc chain | Registered stack |
|---|---|---|
| Parent merges | Child auto-closes if the parent's branch is deleted (git-merge-hazards §2) |
PRs above stay open and auto-retarget to the stack's base |
CI on pull_request: branches: [main] |
Child gets no checks until retargeted (git-pr § Stacked PRs) |
Runs for every PR in the stack |
| Rebasing after a parent lands | Manual git rebase --onto <old-parent-tip> per child |
gh stack sync cascades it |
Required reviews, required status checks, and CODEOWNERS are enforced against the stack's base branch for every PR in the stack — a stack is not a way to route around branch protection.
Ad-hoc chains remain the right tool where a stack cannot go: cross-fork work, and any repo where the merge tooling has not been updated (see Limits).
Setup
gh --version # need 2.90.0+ (git 2.20+)
gh extension install github/gh-stack
gh stack alias # optional; creates `gs`
Lifecycle
gh stack init # start a stack; -b <branch> to set trunk
git add . && git commit -m "feat(a): first layer"
gh stack add feat/layer-b # next branch on top
git add . && git commit -m "feat(b): second layer"
# or in one step:
gh stack add -Am "feat(b): second layer" # -A stages all incl. untracked; -u tracked only
gh stack push # push every branch in the stack
gh stack submit # create/update the linked PRs
gh stack view # ordering + PR links (-s short, --json)
gh stack submit opens an editor and creates drafts by default. For
non-interactive agent use:
gh stack submit --auto --open # auto-generated titles, ready for review
Because --auto generates titles from commits, the commit subjects must already
be conventional (.claude/rules/conventional-commits.md) — a PR title is what
lands on squash-merge, and each commit lands as-is on rebase-merge.
Keeping the stack current
gh stack sync # fetch + rebase + push + refresh PR state
gh stack sync --prune # also delete branches of merged PRs
gh stack rebase # cascading rebase only
gh stack rebase --downstack # trunk → current branch only
gh stack rebase --upstack # current branch → top only
gh stack rebase --continue | --abort # after resolving conflicts
Conflicts exit 3; resolve, then --continue. --abort restores the
pre-rebase state.
Navigating and restructuring
| Command | Effect |
|---|---|
gh stack checkout <stack-no | pr-no | pr-url | branch> |
Check out a stack |
gh stack up [n] / gh stack down [n] |
Move away from / toward trunk |
gh stack top / gh stack bottom / gh stack trunk |
Jump |
gh stack switch |
Interactive branch picker (needs a TTY) |
gh stack modify |
Interactive restructure — x drop, d/u fold, i/I insert, Shift+↑/↓ move, r rename, z undo, Ctrl+S apply |
gh stack link <branch-or-pr> <branch-or-pr>… |
Register existing PRs as a stack, no local tracking |
gh stack unstack [<n>] |
Unregister (--local keeps the GitHub stack) |
gh stack modify and gh stack switch are TTY-interactive — unusable from an
agent's Bash tool. Reach for gh stack rebase/link/view --json instead.
gh stack link is the migration path for an ad-hoc chain that already exists:
it converts the manual chain into a registered stack, which is what buys the
auto-retarget and CI behaviour above.
Merging
Установить git-stacked-prs в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(gh stack init *)Bash(gh stack add *)Bash(gh stack view *)Bash(gh stack push *)Bash(gh stack submit *)Bash(gh stack sync *)Bash(gh stack rebase *)Bash(gh stack checkout *)Bash(gh stack link *)Bash(git add *)Bash(git commit *)Bash(git rebase *)ReadFAQ
Что делает скилл git-stacked-prs?
GitHub native stacked PRs via gh stack. Use when creating, syncing, rebasing or merging a PR stack, or choosing stacks vs manual PR chains.
Как установить скилл git-stacked-prs?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл git-stacked-prs запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic