breakup-pr
What it does
This skill breaks a large code change into vertical feature slices, each delivered as a stacked pull request. It is for developers whose change is too big to review and who want to ship it in safe steps.
When to use it
- βWhen a pull request is too large for a reviewer to read comfortably.
- βWhen you want to split a feature into smaller pull requests that build on each other.
- βWhen you want all parts of a feature to ship together behind one feature flag.
Skill link
https://github.com/lightdash/lightdash/blob/main/.claude/skills/breakup-pr/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βMy pull request changes the database, the API and the frontend. Split it into stacked slices that I can review one at a time.β
5 new skills a week. 1 minute to read.
How it works
The skill plans a set of vertical slices, each one a small change that can be merged and checked on its own. It creates the stacked pull requests with the stacking tool, and all slices sit behind one shared feature flag.
Technical content (original SKILL.md)
Original text by the author, straight from 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
FAQ
What is a vertical slice?
It is a small, complete part of a feature that can be reviewed and merged on its own.
Does the feature ship in parts?
No, all slices sit behind one shared feature flag, so the feature turns on together.
Which tool creates the stack?
The skill uses the gh stack commands from the gh-stack skill.
Details
Original description by the author
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
Popularity
- GitHub stars
- 6.2k
- Ranking position
- #14394
- License
- β
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
lightdash-agent-slack-messaging
6.2kHelps your agent write clear, friendly maintenance and activity reports for Lightdash administrators, based only on the evidence it has.
developing-in-lightdash
6.2kHelps your agent read, create and edit Lightdash dashboards and charts as JSON, including each chart type's settings.
filter-expressions
6.2kHelps your agent write correct filter expressions for Lightdash metric queries, including filters on custom metrics.
mcp-artifact-integration
6.2kHelps your agent show Lightdash query results inside an HTML or React artifact, with loading, error and empty states handled.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.