plan-stacked-pr

大きな機能開発を stacked PR で進めるための計画を立案するスキル。Design doc やPlan から、各 PR の scope・What solves Why・Goal/Acceptance Criteria を定義した計画ドキュメント群を生成する。大きな機能を stacked PR で開発したい、feature 開発の PR 分割計画を立てたい、design doc から実装計画を作りたいときに使う。

15 stars

Best use case

plan-stacked-pr is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

大きな機能開発を stacked PR で進めるための計画を立案するスキル。Design doc やPlan から、各 PR の scope・What solves Why・Goal/Acceptance Criteria を定義した計画ドキュメント群を生成する。大きな機能を stacked PR で開発したい、feature 開発の PR 分割計画を立てたい、design doc から実装計画を作りたいときに使う。

Teams using plan-stacked-pr should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/plan-stacked-pr/SKILL.md --create-dirs "https://raw.githubusercontent.com/sushichan044/dotfiles/main/.agents/skills/plan-stacked-pr/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/plan-stacked-pr/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How plan-stacked-pr Compares

Feature / Agentplan-stacked-prStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

大きな機能開発を stacked PR で進めるための計画を立案するスキル。Design doc やPlan から、各 PR の scope・What solves Why・Goal/Acceptance Criteria を定義した計画ドキュメント群を生成する。大きな機能を stacked PR で開発したい、feature 開発の PR 分割計画を立てたい、design doc から実装計画を作りたいときに使う。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# plan-stacked-pr

Create a structured plan for developing a large feature using stacked PRs. The plan defines the scope, rationale, and acceptance criteria for each PR — without prescribing implementation details.

## When This Skill Applies

- Planning a large feature that should be developed as stacked PRs
- Breaking down a design doc or feature spec into an ordered set of PRs
- Want a clear plan before starting stacked PR development
- Need to communicate a multi-PR development plan to a team

## Core Idea

Planning a stacked PR workflow has two distinct phases: drawing the big picture, then determining the split granularity. This skill handles the big picture — understanding the feature, identifying major areas and their dependencies, and producing plan documents. The actual PR split granularity (how many PRs, what goes where) is determined by the `split-big-pr` skill, which owns the splitting criteria and PR sizing guidelines.

The output is a set of markdown files that serve as the working document throughout development. Each file contains explicit instructions to use the `stacked-pr` skill during implementation.

## Procedure

### 1. Understand the Feature

Gather context about what needs to be built:

- Read the design doc, feature spec, or plan provided by the user
- Explore the current codebase to understand what exists and what needs to change
- Identify the scope boundaries — what's in and what's out

```bash
# Understand the repo structure
gh repo view --json defaultBranchRef --jq .defaultBranchRef.name
git --no-pager log --oneline -20
```

Ask the user clarifying questions if the scope or requirements are ambiguous. Focus on understanding the feature well enough to identify the major areas of work and their dependencies.

### 2. Draw the Big Picture

Identify the major areas of work and their dependency relationships. Think at the level of responsibilities and components, not individual PRs:

- What are the major areas this feature touches? (data layer, domain logic, API, UI, infra, etc.)
- What are the dependencies between these areas? (schema must exist before code that uses it, etc.)
- What is the overall delivery strategy? (incremental rollout, feature flag, big-bang, etc.)

Present this as a high-level overview to the user. This is the "what needs to happen" without yet deciding "how to slice the PRs."

### 3. Determine Split Granularity

Use the `split-big-pr` skill's **Phase 1 (Analysis)** to determine the actual PR boundaries. That skill owns the PR granularity guidelines (`references/pr-granularity.md` in its directory) and the splitting procedure — it decides how many PRs, what goes in each, and in what order.

Provide it with the big picture from Step 2: the major areas, their dependencies, and the delivery strategy. If there is existing code (a branch or diff), point it at that too.

Phase 1 returns a structured split plan — a list of PRs with their scopes, dependency order, and rationale. For each PR, capture:

- **Scope** — exactly what changes this PR covers
- **What solves Why** — what problem this PR solves and why it needs to be a separate PR
- **Goal / Acceptance Criteria** — concrete conditions for this PR to be considered complete

Do not go deeper into "how" — implementation details are left to the developer working on each PR.

### 4. Determine Output Location

Ask the user where to place the plan files. Propose a sensible default:

- For repository-level plans: `docs/plans/<topic>/` or `.plans/<topic>/`
- For session-level plans: within the session workspace

The `<topic>` directory name should be a short, descriptive slug (e.g., `user-auth`, `payment-v2`, `api-redesign`).

### 5. Generate the Plan Documents

Create the following structure:

```
<topic>/
├── overview.md
└── plans/
    ├── 01-<slug>.md
    ├── 02-<slug>.md
    ├── 03-<slug>.md
    └── ...
```

#### overview.md

The overview serves as the entry point for the entire plan.

```markdown
# <Feature Name> — Stacked PR Plan

## Background

<Brief description of the feature and why it's being built>

## References

- [Design Doc](url) — <one-line description>
- <other relevant links>

## Stack Structure

<Dependency tree showing the PR order>
```

main
├─ 01-<slug> — <one-line summary>
│ └─ 02-<slug> — <one-line summary>
├─ 03-<slug> — <one-line summary>
└─ ...

```

## PR Plans

| # | Plan | Summary |
|---|------|---------|
| 1 | [01-<slug>](plans/01-<slug>.md) | <one-line summary> |
| 2 | [02-<slug>](plans/02-<slug>.md) | <one-line summary> |
| ... | ... | ... |

## Workflow

This feature is developed using stacked PRs. Each PR plan below is designed
to be worked on using the `stacked-pr` skill for branch creation, cascade
rebase, CI monitoring, and stack synchronization.

When starting work on any PR in this plan:
1. Use the `prepare-issue-pr` skill to draft the PR with correct base branch and template compliance
2. Use the `stacked-pr` skill for managing the PR stack lifecycle
```

#### Individual PR Plan (plans/NN-slug.md)

Each PR plan follows a consistent template:

```markdown
# PR <N>: <Title>

> Part of [<Feature Name> Stacked PR Plan](../overview.md)

## Scope

<Clear definition of what this PR covers and what it does NOT cover>

## What Solves Why

<What problem does this PR solve, and why does it need to be a separate PR
in the stack? What value does shipping this independently provide?>

## Goal / Acceptance Criteria

- [ ] <Concrete, verifiable condition 1>
- [ ] <Concrete, verifiable condition 2>
- [ ] <Concrete, verifiable condition 3>

## Dependencies

- **Parent:** <parent PR reference or "main">
- **Children:** <child PR references or "none">

## Stack Management

This PR is part of a stacked PR workflow.

- Use the `prepare-issue-pr` skill when creating this PR to draft the title, body, and base branch
- Use the `stacked-pr` skill for cascade rebase, CI monitoring, and stack sync
- Use the `split-big-pr` skill if this PR itself grows too large and needs further splitting
- Base branch: `<parent-branch-name>`

When implementing this PR:

1. Use `prepare-issue-pr` to draft the PR title/body with correct base branch and template compliance
2. Use `stacked-pr` to manage the branch lifecycle and coordinate with other PRs in the stack
```

### 6. Present and Iterate

Show the user the generated plan:

- Present the overview first (the stack structure and PR summary table)
- Highlight any decisions you made about scope boundaries
- Note any areas where you're uncertain about the split

Wait for the user's feedback. Common adjustments:

- Merging two PRs that are too small
- Splitting a PR that covers too much
- Reordering PRs based on priority or risk
- Adjusting scope boundaries

Update the plan documents based on feedback. Iterate until the user is satisfied.

## Edge Cases

### Feature Too Small for Stacking

If the feature analysis shows it can be done in 1–2 reasonably-sized PRs, say so. Not every feature needs a stacked PR plan. Suggest just using the regular PR workflow.

### Unclear Dependencies

When the dependency order between two PR groups is ambiguous, note both options in the plan and ask the user. Often the "right" order depends on deployment strategy or team preferences that the codebase alone doesn't reveal.

### Evolving Plans

Plans are living documents. When the user discovers during implementation that the plan needs adjustment, the plan files should be updated. The `stacked-pr` skill handles the git/PR mechanics of any reordering.

### Existing Partial Implementation

If some of the work is already done (e.g., a branch exists with partial changes), account for it in the plan. The first PR(s) might cover "what's already built" and the remaining PRs cover "what's left."

## Boundaries

- This skill produces **plan documents only** — it does not create branches or PRs.
- Split granularity decisions are delegated to `split-big-pr` Phase 1. This skill does not own PR sizing guidelines.
- For executing the split (creating branches and PRs from an existing diff), use `split-big-pr` Phase 2.
- For ongoing stack maintenance (rebase, CI, sync), use the `stacked-pr` skill.
- The plan stays at the "what and why" level. Implementation details ("how") are out of scope.
- The `<topic>` directory location is determined in consultation with the user, not prescribed by this skill.

Related Skills

stacked-pr

15
from sushichan044/dotfiles

依存関係のある複数の PR を管理・同期するためのスキル。stacked PR のカスケード rebase、PR 間の依存検出、base branch 管理、CI の上流優先修正を行う。PR が別の PR に依存している状況全般で使う — cascade rebase、スタック sync、依存先 PR 更新後のメンテ、PR チェーンの整合性確認などをするときなど。

review-plan

15
from sushichan044/dotfiles

Diagnostically review an implementation plan against the current codebase. Focuses on problem framing, expected behavior, and architecture decisions. This skill is read-only — it does not edit files or rewrite the plan.

typescript-performance

15
from sushichan044/dotfiles

Comprehensive TypeScript performance analysis and optimization. Use when users report slow TypeScript compilation, slow editor experience, or want to investigate TypeScript performance issues. This skill provides diagnostic tools, trace analysis workflows, and optimization strategies. Key triggers include mentions of slow builds, type-checking delays, tsc performance, editor lag with TypeScript, or requests to analyze/improve TypeScript performance. Always prioritize data-driven analysis using --extendedDiagnostics, --generateTrace, and TS Server logs before making optimization recommendations.

watch-ci

15
from sushichan044/dotfiles

CI を監視し、失敗したら自律的に修正してパスするまでループするスキル。push 後・PR 作成後・rebase 後に CI が通るか確認したいとき、CI が落ちていたら直してほしいとき、CI の結果を待ちたいときに使う。「CI 監視して」「CI が通るまで待って」「CI 直して」「push したので CI を見ておいて」など、CI の状態確認・自動修正が必要な場面では必ずこのスキルを呼び出すこと。

vue-style-guide

15
from sushichan044/dotfiles

Vue を書くときは基本的に参考にしてください。 個人的に気に入っている ubgeeei 氏の Vue.js のスタイルガイドです。

vitess

15
from sushichan044/dotfiles

Vitess best practices, query optimization, and connection troubleshooting for PlanetScale Vitess databases. Load when working with Vitess databases, sharding, VSchema configuration, keyspace management, or MySQL scaling issues.

triage-pr-reviews

15
from sushichan044/dotfiles

Triages unresolved PR review comments using gh-pr-reviews. Analyzes code context and classifies each comment as Agree / Partially Agree / Disagree. Walks through each comment one-by-one, asking the user what action to take. Use when the user wants to triage, review, or analyze unresolved PR comments.

terraform-test

15
from sushichan044/dotfiles

Comprehensive guide for writing and running Terraform tests. Use when creating test files (.tftest.hcl), writing test scenarios with run blocks, validating infrastructure behavior with assertions, mocking providers and data sources, testing module outputs and resource configurations, or troubleshooting Terraform test syntax and execution.

terraform-style-guide

15
from sushichan044/dotfiles

Generate Terraform HCL code following HashiCorp's official style conventions and best practices. Use when writing, reviewing, or generating Terraform configurations.

terraform-stacks

15
from sushichan044/dotfiles

Comprehensive guide for working with HashiCorp Terraform Stacks. Use when creating, modifying, or validating Terraform Stack configurations (.tfcomponent.hcl, .tfdeploy.hcl files), working with stack components and deployments from local modules, public registry, or private registry sources, managing multi-region or multi-environment infrastructure, or troubleshooting Terraform Stacks syntax and structure.

teach-impeccable

15
from sushichan044/dotfiles

One-time setup that gathers design context for your project and saves it to your AI config file. Run once to establish persistent design guidelines.

smart-compact

15
from sushichan044/dotfiles

セッションのコンテキストを分析し、重要な情報を保持するためのプロンプトを生成して /compact コマンドの実行を支援するスキル。コンテキストウィンドウが逼迫してきた時や、セッションを整理したい時に使用。