split-and-ship

Solid

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".

Code & Development 335 stars 26 forks Updated 5 days ago MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
84
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill 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 1. Detect the default branch: `gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'` 2. Check the current branch and whether a PR already exists for it using `gh pr view` 3. Save all staged changes, then unstage everything (`git reset`) 4. Stash all changes including untracked files (`git stash --include-untracked`) so files can be selectively restored per group 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: 1. **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 `AskUserQuestion` to confirm the proposed branch name and create it from the appropriate base: - Independent group: branch from the default branch - Stacked group: branch from the previous group's branch 2. **Restore and stage** this group's files from the stash (`git checkout stash -- <files>` 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 group...

Details

Author
tobihagemann
Repository
tobihagemann/turbo
Created
3 months ago
Last Updated
5 days ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category