Split a multi-feature pull request into smaller, focused PRs. Use when: (1) User says 'split pr' or 'break up pr', (2) A PR contains multiple independent features that should be reviewed separately, (3) User wants to decompose a large PR.
Scanned 9/8/2026
Install to Claude Code
npx -y skills add Takazudo/claude-resources --skill pr-split --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Pr Split?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/takazudo-pr-split)More formats (shields.io, HTML) on the badges page.
---
name: pr-split
description: "Split a multi-feature pull request into smaller, focused PRs. Use when: (1) User says 'split pr' or 'break up pr', (2) A PR contains multiple independent features that should be reviewed separately, (3) User wants to decompose a large PR."
---
# PR Split Command
Split a multi-feature pull request into smaller, focused PRs.
**IMPORTANT: This command ALWAYS uses squash merge to discard try-and-error history and create clean, meaningful commits. Never use cherry-pick.**
## Process
### 1. Analyze Current PR
- Check current branch and commits
- Use `gh pr view` for PR details
- **CRITICAL: Extract EXACT base branch using `gh pr view --json baseRefName`**
- Extract original issue reference
- Run `git log origin/<BASE>..HEAD` (not main!)
- Identify distinct features/fixes
### 2. Determine if Split is Needed
- Check if PR contains multiple independent features
- If single feature, inform user split not needed
- If beneficial, explain what will be split
### 3. Plan the Split
- **Use the EXACT base branch from step 1**
- List distinct features/fixes to split
- Present plan for user approval
### 4. Execute Split
For each split feature:
a. **Create new branch from base**
```bash
git fetch origin
git checkout -b feature/split-name origin/<base-branch>
```
b. **Apply changes using squash merge**
```bash
git merge --squash original-branch
```
- Review staged changes
- Unstage files not related to this feature
- Create clean, logical commits
**CRITICAL - NO COMMIT ALTERATION:**
- NEVER use `git commit --amend`
- NEVER use `git rebase`
c. **Push and create PR**
- Use `gh pr create --base <base-branch>`
- Include original issue reference FIRST
- Include old PR reference LAST
### 5. Handle Original PR
- Add `[outdated]` prefix to title
- Update description with references to new PRs
- Close with comment listing new PRs
## Important Notes
- **CRITICAL: ALWAYS use the original PR's base branch for ALL new PRs**
- **CRITICAL: Compare against the correct BASE branch**
- **CRITICAL: Never alter commits** (no amend, no rebase, no force push)
- **CRITICAL: Mark original PR as outdated**
- If the target project's CLAUDE.md defines PR title conventions (e.g. Japanese titles), follow them — otherwise use a clear default
- Always use squash merge to create clean commits
- Ask for confirmation before executing
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!