본문으로 건너뛰기
Skillpedia
일반 코딩6.2k · #14394

breakup-pr

하는 일

이 스킬은 큰 코드 변경을 수직 슬라이스로 나누고, 각 슬라이스를 스택형 풀 리퀘스트로 제공합니다. 변경이 너무 커서 검토하기 어렵고, 안전한 단계로 배포하려는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓풀 리퀘스트가 너무 커서 검토자가 편하게 읽기 어려울 때.
  • ✓기능을 서로 이어지는 작은 풀 리퀘스트로 나누고 싶을 때.
  • ✓기능의 모든 부분을 하나의 기능 플래그 뒤에서 함께 배포하고 싶을 때.

스킬 링크

https://github.com/lightdash/lightdash/blob/main/.claude/skills/breakup-pr/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/lightdash/lightdash/blob/main/.claude/skills/breakup-pr/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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:

  1. Admin can verify/unverify a chart (migration + model + service + API + UI — but only for charts)
  2. Admin can verify/unverify a dashboard (extend to dashboards)
  3. Verified badge appears in search and content browser
  4. Editing content auto-removes verification
  5. 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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬