Split a large feature branch into multiple smaller PRs of max 20 files each. Use when the user wants to break up a big branch, split changes into stacked or parallel PRs, asks "how do I split this PR", mentions a branch has too many files, or wants a PR splitting strategy. Also triggers on phrases like "split this into PRs", "break up this branch", "chunk these changes", "PR plan", or "too many files in this PR".
Ships in pr-workflow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Analyze a feature branch and produce a plan to split it into multiple PRs, grouped by logical cohesion.
Run in parallel:
git branch --show-currentgit remote show origin | grep 'HEAD branch' (or use user-specified base)git diff --name-only <base>git diff --stat <base>Group changed files into coherent PRs that are reviewable in isolation and respect dependency order. Keep tests with their source files. Put foundational changes (shared types, config) in earlier PRs. If grouping is ambiguous, read a sample of files to check imports and relationships.
If a PR changes an exported type/interface, include all consumer files that would break — never split types from their consumers.
Format:
# PR 1: <short descriptive title>
git checkout <source-branch> -- path/to/file1.ts
git checkout <source-branch> -- path/to/file2.ts
# PR 2: <title>
git checkout <source-branch> -- path/to/file3.ts
Rules:
Include a Status section in the plan file with a markdown table tracking per-PR state. This table is the source of truth for progress and must be kept up-to-date as PRs move through the workflow.
Columns:
pending, branch created, pushed, draft opened, opened, merged, failed— if not yet opened—✓ (passed), ✗ (failed), or — (not yet run)Initial table (all PRs start as pending):
## Status
| PR | Status | URL | Branch | Commit | typeCheck |
| --- | ------- | --- | --------------------------- | ------ | --------- |
| 1 | pending | — | `<source-branch>-pr-1` | — | — |
| 2 | pending | — | `<source-branch>-pr-2` | — | — |
After the plan, render an ASCII diagram of the DAG. A PR may have zero, one, or multiple parents. Place each PR once, under its primary parent (the branch it will be cut from). Annotate extra parents with [also depends on PR X, PR Y]. If any PR has multiple parents, add a Dependencies edge list below the tree; otherwise omit it.
Stacked (linear chain):
main
└── PR 1: foundational types (4 files, 120 lines)
└── PR 2: API layer (8 files, 240 lines)
└── PR 3: UI wiring (12 files, 310 lines)
Parallel (independent off the same base):
main
├── PR 1: config cleanup (3 files, 40 lines)
├── PR 2: logging refactor (6 files, 180 lines)
└── PR 3: docs update (2 files, 30 lines)
Diamond (multi-parent):
main
└── PR 1: shared types (4 files, 120 lines)
├── PR 2: API layer (8 files, 240 lines)
├── PR 3: client SDK (6 files, 180 lines)
└── PR 4: integration wiring (10 files, 300 lines) [also depends on PR 2, PR 3]
Dependencies:
PR 1 → PR 2
PR 1 → PR 3
PR 1 → PR 4
PR 2 → PR 4
PR 3 → PR 4
Save the plan to ~/.prs/<branch-name>.md (repo-local; replace / with - in the branch name). Create ~/.prs/ if needed. This file is the running state log — update it after every step below.
Present the plan to the user and stop for confirmation before creating any branches. Show the grouping, the ASCII diagram, and the total counts. Ask explicitly: "Proceed with creating these branches?" Do not run any git checkout -b, git checkout -- <files>, or git commit until the user confirms. If the user asks for adjustments, revise the plan, save, and ask again.
Only run after the user confirms Step 4.
Process PRs in topological order (every PR comes after all its parents). For each PR:
main).git merge each additional parent's branch into it before staging files. If a merge conflicts, stop and surface the conflict — do not auto-resolve.git checkout <source-branch> -- <files...> then git add <files...> (stage by name, never git add -A)~/.prs/<branch-name>.md after each state change for this PR: set Status (branch created → pushed → draft opened/opened), fill in Commit (short SHA), typeCheck (✓/✗), and URL once available. Save after each update — do not batch until the end.Branch naming: <source-branch>-pr-1, <source-branch>-pr-2, etc. (numbering follows the topological order used above).
After all branches are created, switch back to the source branch and list the PR branches.
After branches are created, stop and ask the user to confirm before pushing or opening any PRs. Summarize what will be pushed (branches + target bases), note that PRs will be opened as drafts by default, and ask explicitly: "Push these branches and open PRs as drafts?" Do not run git push or gh pr create until the user confirms. If the user explicitly asks for ready-for-review PRs, skip the --draft flag in Step 7.
Only run after the user confirms Step 6.
Never force-push. Never push to the main/master branch. Set each PR's GitHub base to its primary parent's branch (GitHub only supports a single base). For PRs with multiple parents, note the additional dependencies in the PR description so reviewers know the full merge order. If PULL_REQUEST_TEMPLATE.md exists (check .github/PULL_REQUEST_TEMPLATE.md, .github/pull_request_template.md, docs/PULL_REQUEST_TEMPLATE.md, or repo root), use it as the PR body and fill in each section based on the PR's changes — do not submit the template with empty placeholders. Always open PRs as drafts by default — pass --draft to gh pr create unless the user explicitly requested non-draft/ready-for-review PRs. As each PR is pushed and opened, update its row in the Status table (Status + URL) and save the file.
On failure (merge conflict, type-check failure, push rejected, etc.): set that PR's Status to failed, leave a short note in the file explaining what broke, save, and surface the failure to the user before moving on.
When the user applies further changes to a PR that's already been opened (e.g. review feedback, fixes), do not commit or push, and do not ask to. Leave the changes in the working tree — the user will decide when and how to commit and push. Only act on commit/push if the user explicitly requests it.
What SKILL.md sets; muted values are Claude Code's defaults
/pr-workflow:pr-stackfrom pr-workflow
npx claudepluginhub driangle/ai-powers --plugin pr-workflow14 skills in this plugin
/change-recapRecap what changed in an area of the code over a timeframe — new features, improvements, fixes and under-the-hood work — from the pull requests merged on GitHub in that window, grouped by initiative and project where the issue tracker records them, enriched with the ticket updates and Slack threads from the same window (confirmations, rollouts, problems after merge, follow-ups), and credited to who built and reviewed each change, written so developers and managers can both read it, as an HTML page that can be published as a Claude Artifact. Typically run on Fridays for the week's recap. Use whenever someone asks what changed, shipped, got merged or happened in a repo, service, folder, product area or team this week, last week, this sprint or since a date, asks for a weekly or Friday recap, a "what's new" or a changelog-style summary of recent work, even if they don't say "recap"./commitCommit all uncommitted changes with an auto-generated conventional commit message. Use when the user asks to commit, save changes, or invokes /commit./commit-msgGenerate a one-line conventional commit message from staged changes. Use when the user asks for a commit message or invokes /commit-msg.