Turbo split-and-ship
Execute an approved split plan by creating separate branches, commits, and PRs for each change group. Use when the user asks to \"split and ship\", \"ship the split plan\", \"create separate PRs\", or \"split changes into branches\".
install
source · Clone the upstream repo
git clone https://github.com/tobihagemann/turbo
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/tobihagemann/turbo "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/split-and-ship" ~/.claude/skills/tobihagemann-turbo-split-and-ship && rm -rf "$T"
manifest:
skills/split-and-ship/SKILL.mdsource content
Split and Ship
Ship an approved split plan as separate branches, commits, and PRs.
Context
A split plan must exist in the conversation. The plan specifies an ordered list of groups, each with a name, file list, and branch topology (stacked or independent).
Step 1: Prepare Working Tree
- Detect the default branch:
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name' - Check the current branch and whether a PR already exists for it using
gh pr view - Save all staged changes, then unstage everything (
)git reset - Stash all changes including untracked files (
) so files can be selectively restored per groupgit stash --include-untracked
Verify
git stash list shows the saved changes before proceeding.
Step 2: Ship Each Group
Use
TaskCreate to create a task for each group. Process groups in order.
For each group:
- Determine branch: If the current branch already has a PR and this group's changes align with the PR's purpose, stay on the current branch. Otherwise, use
to confirm the proposed branch name and create it from the appropriate base:AskUserQuestion- Independent group: branch from the default branch
- Stacked group: branch from the previous group's branch
- Restore and stage this group's files from the stash (
restores and stages in one operation). For files with hunks belonging to different groups, restore the file, then use Edit to remove the hunks that belong to later groups before staging. After committing, reset the working tree (git checkout stash -- <files>
) to clean up before the next group.git checkout -- . - Run
Skill/commit-staged-push - Create or update PR:
- Staying on existing branch with a PR: run the
skill/update-pr - New branch: run the
skill targeting the appropriate base (default branch for independent groups, previous group's branch for stacked groups)/create-pr
- Staying on existing branch with a PR: run the
Step 3: Clean Up and Summarize
- Drop the stash
- Check out the last created branch
- Output a summary table: group name, branch, PR URL, and base branch
Then use the TaskList tool and proceed to any remaining task.
Rules
- Never lose uncommitted work. If any step fails (commit hook, push, PR creation), stop and report the failure, which groups have been shipped, and that the stash still contains all changes for recovery.
- Stacked PRs target the previous group's branch. Independent PRs target the default branch.
- For stacked groups, the PR description should note the dependency chain.