← ClaudeAtlas

split-prlisted

Use when the user wants to split a large PR or branch into smaller stacked PRs - "split this PR", "break up this branch", "this PR is too big", "make these stacked PRs", "separate the refactor from the feature", or asks to turn unrelated changes in one branch into a stack of reviewable layers.
XingLiu0923/pr-stack-skill · ★ 1 · Code & Development · score 69
Install: claude install-skill XingLiu0923/pr-stack-skill
# Splitting an existing branch into a stack **Load `pr-stack:stack` first.** The preflight, the blocked-command contract, and the non-interactive command forms all apply here. GitHub's own guidance is to design the layers *before* writing code, and it is right. But people arrive with the branch already written, and "you should not have done that" is not a workflow. This skill is that workflow. ## Step 1 — Ask how the user wants to work Before touching anything, ask exactly one question: > Do you want to **confirm each layer before I create it**, or should I **split > automatically and report when I'm done**? Record the answer and honour it for the whole session. In *confirm* mode, show the proposed branch name, its file list, and its one-sentence rationale, and wait for a yes before each command that changes the repository. Approval is still required in *automatic* mode for anything destructive: `gh stack unstack`, branch deletion, `git reset --hard`, any force operation. ## Step 2 — Preflight ```bash bash "${CLAUDE_PLUGIN_ROOT}/scripts/check-status.sh" git status --porcelain ``` All of these must hold: * `ext=installed`, `auth=authenticated`, `stacks=available` * `git status --porcelain` is empty (clean working tree) If the tree is dirty, stop and ask the user to commit or stash. Never stash on their behalf. If `stacks=NOT available`, stop — this repository cannot host a stack, and no amount of splitting will change that. ## Step 3 — Record a safety anchor ```b