breakup-pr
できること
大きなコード変更を縦のフィーチャースライスに分け、それぞれを積み重ねたプルリクエストとして提出します。変更が大きすぎてレビューできず、安全な段階で出荷したい開発者向けです。
使う場面
- ✓プルリクエストが大きすぎて、レビューする人が読みにくいとき。
- ✓機能を、互いに積み重なる小さなプルリクエストに分けたいとき。
- ✓機能のすべての部分を、1つの機能フラグの下でまとめて出したいとき。
スキルのリンク
https://github.com/lightdash/lightdash/blob/main/.claude/skills/breakup-pr/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このプルリクエストはデータベース、API、フロントエンドを変更しています。一つずつレビューできるように、積み重ねたスライスに分割してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
スキルは、それぞれ単独でマージでき、確認できる小さな変更である縦のスライスを計画します。積み重ねるツールでプルリクエストを作成し、すべてのスライスを1つの共有の機能フラグの下に置きます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Break Up PR into Vertical Feature Slices
You are splitting a large PR into vertical feature slices — each slice is an independently mergeable, CI-green stacked PR delivered via gh stack (see the /gh-stack skill for commands).
All slices are gated behind a single shared feature flag so the feature ships atomically when the flag is enabled.
Why Vertical Slices?
Large PRs are hard to review, hard to reason about, and risky to merge. Vertical slicing solves this by breaking work into small, focused changes that are easier to understand and safer to ship.
Easier code review:
- Reviewers can focus on one concern at a time (e.g., "just the migration" or "just the API")
- Each PR tells a clear story — what changed and why is obvious from the diff
- Smaller diffs mean faster reviews and higher-quality feedback
- Comments and discussions stay focused instead of sprawling across unrelated changes
Iterative improvement:
- Each slice can be reviewed, refined, and merged independently
- Feedback on early slices (e.g., schema design) can inform later slices before they're written
- If a later slice needs rework, earlier slices are already safely merged
- The stack shows a natural progression — reviewers understand the "journey" of the feature
Safer delivery:
- Smaller changes = smaller blast radius if something goes wrong
- Issues are easier to bisect — you know exactly which slice introduced a problem
- Rollback is surgical: revert one slice, not the whole feature
- CI catches issues earlier in the stack, before dependent code is written
Better collaboration:
- Multiple people can review different slices in parallel
- Stack structure makes dependencies explicit — no guessing what to review first
- Merge conflicts are localized to individual slices
- Progress is visible: "3 of 5 PRs merged" is clearer than "PR still in review"
The feature flag unifies it all: Even though slices merge incrementally, the feature flag keeps everything hidden until you're ready to ship. Merge with confidence, ship when ready.
Process
Step 1: Analyze the PR
If given a PR URL, fetch and analyze the diff:
gh pr diff <PR_NUMBER>
If on a branch, analyze the diff against main:
git diff main...HEAD
Understand:
- What files are changed and why
- The dependency graph between changes (schema → backend → frontend)
- What constitutes a "vertical" — an independently testable slice of functionality
Step 2: Identify the Feature Flag
Determine the feature flag name for this feature:
- Check if the PR already uses a feature flag — if so, reuse it
- If not, create one following the naming convention: kebab-case (e.g.,
my-new-feature)
The feature flag goes in packages/common/src/types/featureFlags.ts:
export enum FeatureFlags {
// ... existing flags
MyNewFeature = 'my-new-feature',
}
CRITICAL: The same feature flag is used for ALL vertical slices. This ensures the entire feature is gated atomically.
Step 3: Plan the Vertical Slices
Break the PR into vertical slices ordered by dependency (bottom of stack = first to merge):
What is a vertical slice? A vertical slice is a thin, end-to-end piece of user-facing functionality that cuts through all architectural layers (migration + types + backend + API + frontend). Each slice delivers something a user could test or demo, even if it's narrow.
How to identify slices: Think about the feature from the user's perspective. Ask: "What are the distinct things a user can do with this feature?" Each answer is a candidate slice.
For example, a "content verification" feature might slice as:
- Admin can verify/unverify a chart (migration + model + service + API + UI — but only for charts)
- Admin can verify/unverify a dashboard (extend to dashboards)
- Verified badge appears in search and content browser
- Editing content auto-removes verification
- Admin settings panel to view all verified content
Each slice touches every layer it needs — that's what makes it vertical.
Anti-pattern: horizontal/layer slicing Do NOT slice by architectural layer (e.g., "PR 1: migration", "PR 2: backend types", "PR 3: API", "PR 4: frontend"). This produces PRs that aren't independently testable and forces reviewers to hold the whole feature in their head across multiple PRs.
Slicing guidelines:
- Start with the narrowest end-to-end path — the simplest user action that exe
よくある質問
縦のスライスとは何ですか?
機能の小さく完結した部分で、単独でレビューしてマージできるものです。
機能は部分的に出荷されますか?
いいえ。すべてのスライスは1つの共有の機能フラグの下にあるため、機能は一緒にオンになります。
どのツールでスタックを作りますか?
gh-stackスキルのgh stackコマンドを使います。
詳細
作者による元の説明
Break up a large PR into vertical feature slices delivered incrementally as stacked PRs via `gh stack`. All verticals share a single feature flag so the entire feature ships atomically. Use when: splitting a large PR, breaking up a diff, vertical slicing, incremental delivery, phased rollout, or when a PR is too large to review.
repo: lightdash/lightdash
人気
- GitHubのスター
- 6.2k
- ランキング
- #14394
- ライセンス
- —
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
lightdash-agent-slack-messaging
6.2k証拠に基づいて、Lightdashの管理者向けに、わかりやすく親しみのある保守とアクティビティの報告を書くのを支援します。
developing-in-lightdash
6.2kLightdashのダッシュボードとグラフを、JSONとして読み、作成し、編集するのを支援します。各グラフの種類の設定を含みます。
filter-expressions
6.2kLightdashの指標クエリに、正しいフィルター式を書くのを支援します。カスタム指標へのフィルターも含みます。
mcp-artifact-integration
6.2kLightdashのクエリ結果をHTMLやReactのアーティファクトに表示し、読み込み中、エラー、データなしの状態を扱うのを支援します。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。