split-and-ship
БесплатноБез исполняемых скриптовНе проверенShip an approved split plan as one branch and PR per change group, or as sequential commits. Use when the user asks to "split and ship" or "create separate…
от tobihagemann★ 428 звёзд на GitHubОб этом скилле
Split and Ship
Ship an approved split plan so each change group becomes its own reviewable unit, either as a separate branch and PR or as a sequential commit on the current branch.
Task Tracking
At the start, use TaskCreate to create a task for each phase:
- Verify the groups and choose a shipping path
- Ship as separate branches and PRs (if chosen)
- Ship as commits on the current branch (if chosen)
Step 1: Verify the Groups and Choose a Shipping Path
Use the approved, ordered groups and their dependencies from the conversation. Before either handoff below, use TaskUpdate to close all three tasks for this split invocation as handed off, preserving any parent tasks. The router owns the remaining shipping work.
If the user invoked this skill directly without approved groups, hand off to the /ship skill with their split request and return its outcome. It owns grouping and calls this skill with the approved plan.
Compare the full staged diff with the approved groups, hunk by hunk for shared files. If unrelated changes are staged, leave the index intact and resolve the mismatch with the user. If approved hunks still need staging, hand off to the /ship skill with the approved plan and return its outcome. Choose the shipping path only once the index matches.
Detect the repository state:
- Default branch:
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name' - Current branch name, and whether it tracks an upstream
- Whether an open PR exists for the current branch (
gh pr view --json state); a closed or merged one counts as none
Sample the prevailing workflow from recent default-branch history (git log --first-parent origin/<default-branch> -n 30 --pretty=%s): judge whether changes mostly land through pull requests (merge-PR commits or (#N)-suffixed squash commits) or are committed directly to the default branch.
Output a one-line summary of the detected state as text. Then use AskUserQuestion to choose how to ship the groups:
- Separate branches and PRs — one branch and PR per group (Step 2)
- Commit each group and push — one commit per group on the current branch, then push (Step 3)
- Commit each group only — one commit per group on the current branch, no push (Step 3)
Inside a linked worktree (where git rev-parse --git-dir differs from --git-common-dir), on a branch with no upstream and in a direct-commit history, offer Commit each group and push to <default-branch> in place of Commit each group and push: one commit per group on the current branch, rebased onto origin/<default-branch> and pushed to <default-branch> (Step 3).
Recommend the option that fits this repo by listing it first and labeling it (Recommended): a PR-based history recommends separate branches and PRs; a direct-commit history recommends committing each group and pushing.
If the user declines (chooses the free-form "Other" option or asks to abort), leave the changes staged and do not commit.
Step 2: Ship as Separate Branches and PRs
Take this step only when the user chose separate branches and PRs.
Prepare the working tree
Stash all changes, untracked files included, without unstaging first: git stash push --include-untracked -m 'split-and-ship <tag>'. The tag is the output of head -c 4 /dev/urandom | xxd -p. Every worktree of the repository shares the stash list, so <stash> below is the commit of the entry whose message carries the tag in git stash list --format='%gd %H %s', never a position such as stash@{0}.
Verify the tagged entry exists and git status --short lists nothing the stash should have taken before proceeding. Entries for a submodule, a nested repository, or files a stashed ignore rule had hidden may remain. When either check fails, stop and report where the changes now are.
Ship each group
Use TaskCreate to create a task for each group. Process groups in order.
A group is held when it builds on a group whose PR was handed over for editing and is neither posted nor cancelled yet, or when it builds on a held group. Leave a held group unshipped and continue with the next group.
For each group:
- Determine branch: If the current branch already has an open PR and this group's changes align with the PR's purpose, stay on the current branch. Otherwise, use
AskUserQuestionto confirm the proposed branch name and create it from the appropriate base:- Group that builds on an earlier group: branch from that group's branch (stacked)
- Group with no dependencies: branch from the default branch (independent)
- Restore and stage this group's files from the stash's staged snapshot (
git checkout '<stash>^2' -- <files>restores and stages in one operation). For files with hunks belonging to different groups, restore the file, use Edit to remove the unwanted hunks, then re-stage it (git add <file>): for an independent group, remove every other group's hunks; for a stacked group, remove only later groups
Установить split-and-ship в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл split-and-ship?
Ship an approved split plan as one branch and PR per change group, or as sequential commits. Use when the user asks to "split and ship" or "create separate PRs".
Как установить скилл split-and-ship?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл split-and-ship запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic