/dev-workflows:stack-prsfrom Michael Holley's Dev Workflows
Split one large set of changes into a stack of smaller, separately reviewable PRs.
Ships in Michael Holley's Dev Workflows. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The output of this skill is a proposal: an ordered stack of PRs, presented for the user to approve, reshape, or reject. Cutting branches happens in the last step, and only on their word.
A stack is an ordered chain of PRs, each based on the one below it. Two properties make it worth the extra branches:
Common seams, roughly in stack order: shared setup (fixtures, helpers, config) below the code that uses it; refactors below the behavior change they enable; mechanical or generated edits apart from hand-written ones; then one PR per feature, route, or area.
Context is the unit, never the file. Splitting by path produces PRs a reviewer has to reassemble in their head, and reviews worse than the one big PR it came from - so a file that only makes sense next to its neighbor ships with it. Three to five PRs is a healthy stack.
Establish what is in play: the base branch, and whether the changes are committed on a branch, staged, or loose in the working tree. Read the actual diff - hunk by hunk, not the file list. Done when you can name every changed file and what the change to it does.
For each change, work out what else in the diff it needs: an import, a fixture, a helper, a renamed symbol, a config key. This is the legwork the grouping rests on - a missed dependency produces a stack that does not build. Done when every changed file's dependencies on the other changes are named, including "none".
Cut the changes along the seams into an ordered stack. Each entry gets:
When the changes genuinely resist splitting - one tangled feature, or small enough already - say so and recommend a single PR instead. Done when every changed file lands in exactly one PR, no PR depends on one above it, every PR's context is nameable in one sentence without referring to its file paths, or you have recommended a single PR.
Present the stack as an ordered list, bottom PR first, and say in one line why you cut it there. Invite the user to merge, reorder, or resplit entries. Done when the user has approved a stack or asked for a different grouping.
Needs the gh stack extension, and every change sitting uncommitted in the working tree - when the work is already committed, soft-reset it back onto the base first so the files are free to split.
Build bottom-up, one layer per PR:
gh stack init --base <base> <bottom-branch> - starts the stack and checks out its bottom branch.git add <paths>, commit using the PR's title as the message, then run the repo's validation so the layer lands green. Name the paths every time: -A and -u sweep the other PRs' files into the wrong commit.gh stack add <next-branch> to open the layer above, then repeat step 2 on it.Once every layer is committed, gh stack submit --auto --open pushes all branches and opens the chained PRs. Its generated titles and bodies are placeholders, so rewrite each one:
file-pr available - check out each branch, bottom-up, and invoke file-pr with auto. The PR exists already, so it updates it. Its base is the branch below, not the repo default.gh pr edit <branch> --title ... --body ... per PR:
Report the PR URLs bottom-first. Done when every PR in the approved stack is open and its URL is reported.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub michaelholley/cc-plugins --plugin dev-workflows13 skills in this plugin
/file-prFile a concise pull request. Use when the user asks to file, open, or create a PR./gone-cleanupDelete local git branches whose remote branch is gone, together with their leftover worktrees, after per-branch confirmation. Use when the user wants to clean up stale, merged, or "gone" local branches or worktrees./grillStress-test a plan, design, or decision by interviewing the user one round of pickable questions at a time. Use when the user wants their thinking challenged, gaps found, or assumptions surfaced before work starts, or says "grill me", "interview me" or "grilling"./huhStop. I did not understand your last message. Explain./matches-intentValidate an implementation against its original intent. Use when the user wants to check whether a PR, branch, or diff actually does what it was intended to do, or asks if it "matches intent"./park-taskPark an out-of-scope task as a one-PR GitHub issue. Use when something surfaces mid-work that should be captured now and done later, or says "park this", "park task", or "side task".