一键导入
split-pr
Split a bloated PR into a stack of small, reviewable PRs
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Split a bloated PR into a stack of small, reviewable PRs
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Run CodeRabbit CLI code review and interactively fix issues
Write detailed commit messages and create commits
Run formatters and linters, then fix reported issues
Generate PR title and description from branch diff against origin/main
Comprehensive PR review with detailed explanations and constructive feedback
Analyze and resolve git merge conflicts with guided assistance
基于 SOC 职业分类
| name | split-pr |
| description | Split a bloated PR into a stack of small, reviewable PRs |
| triggers | ["split pr","split pull request","break up pr","pr stack","stacked prs"] |
Use this skill to break a large, multi-concern PR into a stack of small, self-contained, reviewable PRs.
git diff --stat origin/main..HEAD | tail -5
git diff --name-only origin/main..HEAD | sort
git log --oneline origin/main..HEAD
Read through the diff and categorize every changed file into logical groups. Common strategies:
For each group, identify:
Use AskUserQuestion to confirm the grouping.
Order the PRs so that:
For each PR in the stack:
git checkout -b <branch-name> <base>
# Extract relevant changes
git checkout <original-branch> -- <file1> <file2>
# Verify lint passes
make lint
# Verify tests pass
make test/unit
# Push and create PR
git push -u origin <branch-name>
gh pr create --title "<title>" --body "$(cat <<'EOF'
## Summary
<description>
## PR Stack
This is part of a PR stack:
- PR 1: <title> (base)
- **PR 2: <this PR>** <- you are here
- PR 3: <title>
## Test plan
- [ ] `make lint` passes
- [ ] `make test/unit` passes
EOF
)"
For each created PR, verify:
make lint passesmake test/unit passes## PR Stack Summary
| # | PR | Title | Base | Files | Status |
|---|-----|-------|------|-------|--------|
| 1 | #XX | title | main | N | Ready |
| 2 | #YY | title | PR 1 | N | Ready |
git checkout <branch> -- <file> to extract specific filesmake lint after extracting changes