breakup-pr

Splits large pull requests into vertical feature slices delivered as Graphite stacked PRs.

6.1k|768|Updated Mar 19, 2021
One-click install
npx skills add https://github.com/lightdash/lightdash --skill breakup-pr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: breakup-pr
Source: https://github.com/lightdash/lightdash/tree/main/.claude/skills/breakup-pr
Command: npx skills add https://github.com/lightdash/lightdash --skill breakup-pr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Large pull requests are hard to review, risky to merge, and difficult to roll back. This Skill breaks a big PR into small, independently mergeable vertical slices so reviewers can focus on one concern at a time and each change ships safely behind a shared feature flag.

Core Features & Use Cases

  • Vertical slice planning: Analyzes a PR diff and decomposes it into end-to-end user-facing slices (migration + backend + API + frontend) rather than horizontal layer splits.
  • Graphite stacked PRs: Creates and submits each slice as a stacked PR using Graphite (gt) commands, keeping dependencies explicit.
  • Single shared feature flag: Gates all slices behind one flag in packages/common/src/types/featureFlags.ts so the feature ships atomically.
  • Use Case: You have a 3,000-line PR adding content verification. The Skill splits it into five reviewable PRs — verify charts, extend to dashboards, show badges in search, auto-remove on edit, and an admin settings panel — each CI-green and flag-gated.

Quick Start

Ask the agent to break up the current branch's PR into vertical slices using Graphite stacked PRs behind a single feature flag.

Frequently Asked Questions about breakup-pr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I break up a large pull request into smaller PRs?

Analyze the diff to identify user-facing vertical slices, then implement each slice as a stacked PR using Graphite. Each slice cuts through all layers (migration, backend, API, frontend) and stays behind one shared feature flag.

What is vertical slicing vs horizontal slicing for pull requests?

Vertical slicing creates end-to-end slices of user-facing functionality touching all layers, while horizontal slicing splits by layer (migration PR, backend PR, frontend PR). Vertical slices are independently testable and reviewable; horizontal slices are not.

How do stacked PRs work with Graphite?

Graphite manages dependent branches as a stack. You create each slice with gt c --no-interactive -m, submit with gt s --no-interactive, and submit the whole stack with gt s --stack --no-interactive, then verify with gt log.

Should each PR slice use its own feature flag?

No. All vertical slices must share a single feature flag defined in packages/common/src/types/featureFlags.ts. This ensures the entire feature ships atomically when the flag is enabled, even though slices merge incrementally.

When should I not split a PR into vertical slices?

Avoid slicing when a slice would exceed roughly 600 lines without further breakdown, when slices would be infrastructure-only with no user-facing change, or when gating would break existing behavior with the flag off.