ST

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.zip

Installs 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.
134 chars✓ has a “when” trigger
Intermediate

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

You give it
Large task exceeding 200 diff lines
You get back
Planned stack of pull requests with branching and merge instructions

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:

  1. Merge PR 1 into main.
  2. Rebase PR 2 onto main, then merge.
  3. Rebase PR 3 onto main, then merge.

5. Handle Changes

If a reviewer requests changes to PR 1:

  1. Make changes on PR 1's branch.
  2. Rebase PR 2 onto updated PR 1.
  3. Rebase PR 3 onto updated PR 2.
  4. 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.

SkillInstallsUpdatedSafetyDifficulty
stacked-prs (this skill)06moReviewIntermediate
resolve-conflicts818moReviewIntermediate
dependency-upgrade265moReviewIntermediate
git-commits214moNo flagsBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry