Analyzes current changes and suggests how to split them into smaller, reviewable PRs
52
57%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.claude/skills/split-pr/SKILL.mdHelp developers break down large changesets into logical, reviewable pull requests. This skill analyzes the current diff and proposes a splitting strategy that keeps changes atomic and reviewable.
Run these commands to understand the scope:
# Get detailed file statistics
git diff main...HEAD --stat
# List all changed files
git diff main...HEAD --name-only
# Show commit history for context
git log main...HEAD --oneline
# Count non-generated files changed
git diff main...HEAD --name-only | grep -v 'vendor/' | grep -v '\.pb\.go$' | grep -v 'zz_generated' | grep -v '^docs/' | wc -l
# Count lines changed (excluding generated code)
git diff main...HEAD --stat -- . ':(exclude)vendor/*' ':(exclude)*.pb.go' ':(exclude)zz_generated*' ':(exclude)docs/*' | tail -1Assess whether the changes exceed recommended limits:
If changes exceed these limits or mix multiple concerns, proceed to split analysis.
Examine the changed files and identify natural boundaries:
Use these commands to help:
# Group changed files by directory
git diff main...HEAD --name-only | grep -v 'vendor/' | grep -v '\.pb\.go$' | cut -d'/' -f1-2 | sort | uniq -c
# Show changes by package
git diff main...HEAD --name-only | grep '\.go$' | grep -v '_test\.go$' | cut -d'/' -f1-3 | sort | uniq -cCreate a structured plan with multiple PRs:
For each proposed PR, specify:
Determine the optimal order for creating PRs:
Provide a clear, actionable plan:
## Proposed PR Split
### Summary
Currently [X] files changed with [Y] lines modified. Recommend splitting into [N] PRs:
### PR 1: [Name] (Create First)
**Purpose**: [What and why]
**Files**:
- path/to/file1.go
- path/to/file2.go
**Size**: ~100 LOC
**Dependencies**: None
**Tests**: Includes unit tests for new functionality
### PR 2: [Name] (After PR 1)
**Purpose**: [What and why]
**Files**:
- path/to/file3.go
**Size**: ~150 LOC
**Dependencies**: Requires PR 1 (uses new interface)
**Tests**: Integration tests
[... continue for each PR ...]
## Next Steps
1. Would you like me to help create PR 1 first?
2. Should I create a tracking issue for the overall work?
3. Any changes to this split strategy?Refactoring + Feature:
Multi-layer Feature:
Package Restructuring:
Kubernetes Operator Changes:
Current state: 8 files changed, 450 lines
Split strategy:
pkg/ package (3 files, 200 lines)Rationale: Business logic is independently testable and reusable
Current state: 15 files changed, 800 lines
Split strategy:
Rationale: Each PR is independently valuable and testable
Current state: 12 files changed, 600 lines
Split strategy:
Rationale: Each PR represents a complete vertical slice of functionality
After presenting the split strategy:
cd373ec
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.