본문으로 건너뛰기
cccskills
무료GitHub에 공개

pr-splitter

Split a large pull request into smaller, reviewable changes. Plan branch dependencies, extract related code, verify each part, and track review changes while preserving the intent of the original work.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Use when breaking a large, complex, messy, or hard-to-review pull request into multiple smaller PRs; planning stacked PRs; extracting independent changes from a branch; splitting mixed refactor and behavior changes; managing drift after review feedback; rebasing follow-up PRs as earlier PRs change; or preserving original branch intent while shipping incrementally.

설치 방법 보기

이럴 때 유용합니다

  • Split a large pull request into reviewable parts
  • Separate refactoring from behavior changes
  • Plan dependent pull requests
  • Update follow-up branches after review feedback

포함된 파일(1)

  • SKILL.md5.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

PR Splitter

Preserve the original PR as source material, build smaller reviewable PRs intentionally, and track drift locally as review feedback changes the stack.

Required workflow

  1. Snapshot before touching history

    • Check git status.
    • Create an immutable local reference to the original branch: git branch backup/original-large-pr.
    • Do not delete or rewrite the original branch until the split is complete.
  2. Inventory the original PR

    • Inspect git diff --stat <base>...HEAD, git diff --name-only <base>...HEAD, and git log --oneline <base>..HEAD.
    • Classify changes by review unit: prep/refactor, API/type changes, behavior, tests, docs, cleanup, generated/lock files.
  3. Create a local scratchpad

    • Write split notes to an uncommitted local file, preferably .notes/pr-split.md.
    • Ensure .notes/ is ignored or leave it untracked. Do not commit scratchpad notes unless the user explicitly asks.
    • Track: original branch, base branch, planned PRs, files/hunks extracted, verification per PR, remaining original diff, and intentional drift from review feedback.
  4. Choose the split shape

    • Use stacked PRs when later work depends on earlier work.
    • Use parallel PRs only when changes are truly independent.
    • Use foundation + parallel follow-ups when one shared prep change unlocks independent work.
  5. Extract changes safely

    • Prefer fresh branches from the correct base plus selective restore over rewriting messy history.
    • Use path-level extraction for clean file ownership: git checkout backup/original-large-pr -- path/to/file.
    • Use hunk-level extraction for mixed files: git restore -p --source backup/original-large-pr -- path/to/file.
    • Keep each PR independently buildable and reviewable.
  6. Verify each PR independently

    • Run the narrowest relevant build, typecheck, lint, and tests for that PR's scope.
    • Do not leave tests, docs, or generated files separated from the code they validate unless the split plan explicitly calls for it.
  7. Manage drift deliberately

    • Treat reviewer-approved changes as the new source of truth for the stack.
    • After changing an earlier PR, rebase dependent PRs onto it and resolve conflicts in favor of the reviewed direction, not blindly in favor of the original branch.
    • Compare the evolving stack against backup/original-large-pr to find remaining intent, not to force byte-for-byte equality.
    • Record intentional differences in .notes/pr-split.md.
  8. Use range-diff for rewritten stacks

    • Use git range-diff after rebases, conflict resolution, or force-pushes to understand what changed.
    • Summarize meaningful range-diff results for reviewers when updating a stacked PR.

PR description pattern

Keep PR descriptions concise and reviewer-facing:

## Summary

This is PR N of M split from a larger change.

## Scope

- ...

## Intentionally excluded

- Follow-up PR will handle ...

## Verification

- ...

Do not put the full split ledger in PR descriptions. Keep detailed extraction notes and drift tracking in .notes/pr-split.md.

Scratchpad template

# PR split scratchpad

Original branch: backup/original-large-pr
Base branch: main

## Planned PRs

1. branch-name
   - Scope:
   - Files/hunks extracted:
   - Verification:
   - Changeset: (package names, bump type, scoped message)
   - Status:

## Remaining original intent

- ...

## Drift notes

- Date / branch / reason:

Changesets

Each split PR must carry its own changeset scoped to the changes in that PR. Do not keep the original changeset from the source branch — it covers the full combined change and does not belong in any single split PR.

After extracting changes into a split branch:

  1. Delete any changeset files carried over from the original branch. These were written for the combined diff and will produce incorrect changelog entries.
  2. Create a new changeset for each PR using the CLI (see .mastracode/commands/changeset.md):
    pnpm changeset -s -m "your scoped message" (--major | --minor | --patch) pkg-name
    
  3. Scope the message to that PR's changes only. The changeset message should describe what this specific PR does, not the full original feature.
  4. Include only the packages actually changed in this PR. If the original changeset listed five packages but this PR only touches @mastra/core, the new changeset should only reference @mastra/core.
  5. Match the version bump type to the PR's scope. A prep/refactor PR is typically patch; a PR introducing new API surface is minor; a PR with breaking changes is major.

Add changeset creation to the scratchpad template under each planned PR's verification checklist so it is not forgotten.

Common failure modes

Avoid splitting by file when behavior spans files, extracting tests without code, leaving follow-up PRs uncompilable, force-pushing without a reviewer summary, deleting the original branch early, reverting review feedback while resolving stack conflicts, and keeping the original branch's changeset in every split PR instead of creating scoped changesets per PR.

Default output

When asked to split a PR, produce:

  1. proposed PR sequence,
  2. branch strategy,
  3. scratchpad path and initial contents,
  4. extraction commands,
  5. verification plan for each PR,
  6. drift-management plan.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Design and audit an agent's system prompt, the instructions that guide its work. Define a concrete outcome, starting input, available tools, completion checks, fallback behavior, and final report so the prompt describes a complete run.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Designing the core instructions for a new agent
  • Auditing a prompt before saving it
  • Defining behavior when tools or permissions are missing
mastra-ai/mastra2.9만2026년 10월 21일 업데이트

Create a dedicated test project linked to the current worktree and check Agent Builder through APIs and browser interactions. It covers agent and skill management, permissions, defaults, and related features, with selectable test sections.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Validate an Agent Builder feature branch before review
  • Check role-based permissions and authentication
  • Test agent and skill management through APIs and the UI
mastra-ai/mastra2.9만2026년 10월 21일 업데이트

Reviews pull requests for bugs, error handling, code quality, and style consistency. Organizes feedback into an overview, must-fix issues with file locations, improvement suggestions, and positive notes so reviewers can distinguish urgent problems from refinements.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Finding bugs that must be fixed before merging
  • Reviewing TypeScript types and asynchronous code
  • Checking naming, imports, and leftover debug statements
mastra-ai/mastra2.9만2026년 10월 21일 업데이트

Design instructions for agents that write, fix, review, or refactor code. Define behavior based on file access, select suitable tools, and set clear verification and completion rules for repository changes or copyable code output.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Designing an agent for repository bug fixes
  • Defining a pull request review agent
  • Creating a code generator without workspace access
mastra-ai/mastra2.9만2026년 10월 21일 업데이트

Configure Factory board behavior and GitHub or Linear event handlers in deployment code. Adjust stage transitions, phase meanings, and tool-result handling, then check the changes with focused tests and versioned audit records.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Add approval requirements to board transitions
  • Change GitHub or Linear event handling
  • Define custom board phases and tool-result rules
mastra-ai/mastra2.9만2026년 10월 21일 업데이트

Design agents that draft blog posts, social posts, newsletters, and marketing copy. Define the audience, brand voice, length, and required output so each agent delivers a complete draft with a headline and supporting notes.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Build a blog writing agent with a consistent brand voice
  • Design an agent for LinkedIn product posts
  • Define delivery rules for newsletter drafts
mastra-ai/mastra2.9만2026년 10월 21일 업데이트

mastra-ai의 스킬 모두 보기

이 스킬의 문제 신고