breakup-pr
하는 일
이 스킬은 큰 코드 변경을 수직 슬라이스로 나누고, 각 슬라이스를 스택형 풀 리퀘스트로 제공합니다. 변경이 너무 커서 검토하기 어렵고, 안전한 단계로 배포하려는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓풀 리퀘스트가 너무 커서 검토자가 편하게 읽기 어려울 때.
- ✓기능을 서로 이어지는 작은 풀 리퀘스트로 나누고 싶을 때.
- ✓기능의 모든 부분을 하나의 기능 플래그 뒤에서 함께 배포하고 싶을 때.
스킬 링크
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분.
작동 방식
스킬은 각각 작은 변경으로 따로 병합하고 확인할 수 있는 수직 슬라이스들을 계획합니다. 스택형 풀 리퀘스트는 도구로 만들며, 모든 슬라이스는 하나의 공통 기능 플래그 뒤에 둡니다.
기술 내용 (원본 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
자주 묻는 질문
수직 슬라이스란 무엇인가요?
기능의 작지만 완결된 일부로, 단독으로 검토하고 병합할 수 있습니다.
기능이 여러 번에 나뉘어 배포되나요?
아니요, 모든 슬라이스가 하나의 공통 기능 플래그 뒤에 있으므로 기능이 함께 켜집니다.
스택은 어떤 도구로 만드나요?
스킬은 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.2k에이전트가 Lightdash 대시보드와 차트를 JSON으로 읽고, 만들고, 수정하도록 돕습니다. 차트 종류별 설정도 포함합니다.
filter-expressions
6.2k에이전트가 Lightdash 지표 쿼리에 쓸 필터 식을 올바르게 작성하도록 돕습니다. 사용자 정의 지표에 대한 필터도 포함합니다.
mcp-artifact-integration
6.2k에이전트가 Lightdash 쿼리 결과를 HTML이나 React 아티팩트 안에 보여 주며, 로딩, 오류, 빈 상태를 처리하도록 돕습니다.