stacked-prs
A systematic approach to breaking down tasks over 200 lines of code into a sequence of smaller, standalone, and independently reviewable pull requests.
Install
mkdir -p .claude/skills/stacked-prs && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14964" && unzip -o skill.zip -d .claude/skills/stacked-prs && rm skill.zipInstalls to .claude/skills/stacked-prs
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Procedure for creating and managing stacked PRs when a task exceeds 200 diff lines. Use this when a task is too large for a single PR.Key capabilities
- →Plan a stack of pull requests for large tasks
- →Create dependent branches for stacked PRs
- →Open pull requests targeting parent branches
- →Manage merge order for stacked PRs (bottom-up)
- →Handle changes and rebasing across dependent branches
- →Draft PR descriptions referencing parent and child PRs
How it works
The skill provides a procedure for breaking down large tasks into smaller, functional pull requests by planning the stack, creating dependent branches, and managing the merge order. Each PR must be standalone and independently reviewable.
Inputs & outputs
When to use stacked-prs
- →Decompose a large feature into smaller, logical pull requests
- →Organize branching strategies for multi-layer feature development
- →Draft pull request descriptions that reference the parent and child PRs in a stack
- →Rebase dependent branches after merging foundational changes
About this skill
When a task will produce more than 200 diff lines, split it into a stack of PRs. Each PR must be fully functional, standalone, and independently reviewable.
When to Stack
- Estimated diff > 200 lines after scoping.
- Task has natural layers (e.g., data model → API → UI).
- Multiple independent concerns in one task.
Procedure
1. Plan the Stack
Before writing code, define the stack:
Stack for feature/PROJ-123-user-auth:
PR 1: feature/PROJ-123-user-auth-model — User model and migrations
PR 2: feature/PROJ-123-user-auth-api — Auth API endpoints
PR 3: feature/PROJ-123-user-auth-ui — Login/signup UI
Each PR must:
- Be fully functional on its own (tests pass, no broken state).
- Provide standalone value (not just a partial step).
- Be ≤200 diff lines.
2. Create Branches
# PR 1: branch from main
git checkout -b feature/PROJ-123-user-auth-model main
# PR 2: branch from PR 1
git checkout -b feature/PROJ-123-user-auth-api feature/PROJ-123-user-auth-model
# PR 3: branch from PR 2
git checkout -b feature/PROJ-123-user-auth-ui feature/PROJ-123-user-auth-api
3. Open PRs
- PR 1 targets
main. - PR 2 targets PR 1's branch.
- PR 3 targets PR 2's branch.
- Note the stack in each PR description:
## Stack - **PR 1** (this): User model and migrations → `main` - PR 2: Auth API endpoints → `feature/PROJ-123-user-auth-model` - PR 3: Login/signup UI → `feature/PROJ-123-user-auth-api`
4. Merge Order
Always bottom-up:
- Merge PR 1 into
main. - Rebase PR 2 onto
main, then merge. - Rebase PR 3 onto
main, then merge.
5. Handle Changes
If a reviewer requests changes to PR 1:
- Make changes on PR 1's branch.
- Rebase PR 2 onto updated PR 1.
- Rebase PR 3 onto updated PR 2.
- Force-push the rebased branches.
When not to use it
- →When the estimated diff is less than 200 lines
- →When the task does not have natural layers
- →When there are no multiple independent concerns in one task
Limitations
- →Each PR must be fully functional on its own
- →Each PR must provide standalone value
- →Each PR must be ≤200 diff lines
How it compares
This skill formalizes the process of creating and managing stacked PRs, offering a structured approach to breaking down large features that is more organized than creating a single, monolithic PR.
Compared to similar skills
stacked-prs side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| stacked-prs (this skill) | 0 | 6mo | Review | Intermediate |
| resolve-conflicts | 81 | 8mo | Review | Intermediate |
| dependency-upgrade | 26 | 5mo | Review | Intermediate |
| git-commits | 21 | 4mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
resolve-conflicts
antinomyhq
Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.
dependency-upgrade
wshobson
Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.
git-commits
bonny
Create well-structured git commits in logical chunks following best practices
git-advanced-workflows
wshobson
Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.
github-multi-repo
ruvnet
Multi-repository coordination, synchronization, and architecture management with AI swarm orchestration
git-workflow-enforcer
CrazyDubya
Ensures commits follow conventional commits, branch naming conventions, and PR templates. Use when creating commits, branches, or PRs, or when user mentions git workflow.