Help us improve
Share bugs, ideas, or general feedback.
Split a large branch into N stacked logical branches with hunk-level granularity
npx claudepluginhub iron-ham/splitSplit a large branch into N stacked logical branches with hunk-level granularity. Analyzes diffs, groups changes into logical units, and creates stacked branches ready for separate PRs.
Share bugs, ideas, or general feedback.
A Claude Code skill that splits a large branch into N stacked logical branches with hunk-level granularity.
Large branches are hard to review. /split analyzes your branch's diff against its base, groups changes into logical units (models, API, tests, etc.), and creates stacked branches — each building on the previous — ready for separate PRs.
/plugin marketplace add Iron-Ham/split
/plugin install split@split
Clone the repo and copy the skill files into Claude Code's skills directory:
git clone https://github.com/Iron-Ham/split.git ~/split
cd ~/split
mkdir -p ~/.claude/skills/split/scripts
cp skills/split/SKILL.md ~/.claude/skills/split/
cp skills/split/scripts/split_diff.py ~/.claude/skills/split/scripts/
chmod +x ~/.claude/skills/split/scripts/split_diff.py
git clone https://github.com/Iron-Ham/split.git ~/split
mkdir -p ~/.codex/skills/public/split/scripts
cp ~/split/skills/split/SKILL.md ~/.codex/skills/public/split/
cp ~/split/skills/split/scripts/split_diff.py ~/.codex/skills/public/split/scripts/
chmod +x ~/.codex/skills/public/split/scripts/split_diff.py
For Cursor or other agents, clone the repo and copy skills/split/SKILL.md and skills/split/scripts/split_diff.py to wherever your agent reads custom instructions from.
gh CLI (for automatic PR creation)/split # Auto-detect number of groups
/split 3 # Split into 3 groups
/split --base dev # Diff against 'dev' instead of main
/split 4 --base dev # Both
Branch 2 contains all changes from branch 1 plus its own. Branch 3 contains branches 1+2 plus its own. Each PR targets the previous branch.
main ─── branch-1-models ─── branch-2-api ─── branch-3-tests
If a single file has changes belonging to different groups, the skill splits at the hunk level — only the relevant hunks are applied to each branch.
MIT