Agent skill

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

Stars 261
Forks 21

Install this agent skill to your Project

npx add-skill https://github.com/tobihagemann/turbo/tree/main/skills/split-and-ship

SKILL.md

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 groups before staging. After committing, reset the working tree (git checkout -- .) to clean up before the next group.
  3. Run /commit-staged-push Skill
  4. Create or update PR:
    • Staying on existing branch with a PR: run the /update-pr skill
    • New branch: run the /create-pr skill targeting the appropriate base (default branch for independent groups, previous group's branch for stacked groups)

Step 3: Clean Up and Summarize

  1. Drop the stash
  2. Check out the last created branch
  3. Output a summary table: group name, branch, PR URL, and base branch

Check your task list for remaining tasks and proceed.

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.

Expand your agent's capabilities with these related and highly-rated skills.

tobihagemann/turbo

review-api-usage

Check API, library, and framework usage in code against official documentation and installed skill knowledge. Flags deprecated APIs, incorrect method signatures, wrong parameter types, version-incompatible patterns, and best-practice violations. Use when the user asks to "review API usage", "check API usage", "verify against docs", "check library usage", "validate API calls", "check against documentation", or "check for deprecated APIs".

261 21
Explore
tobihagemann/turbo

resolve-pr-comments

Evaluate, fix, answer, and reply to GitHub pull request review comments. Handles both change requests (fix or skip) and reviewer questions (explain using reasoning recalled from past Claude Code transcripts). Use when the user asks to "resolve PR comments", "fix review comments", "address PR feedback", "handle review comments", "address review feedback", "respond to PR comments", "answer review questions", or "address code review".

261 21
Explore
tobihagemann/turbo

consult-codex

Multi-turn consultation with Codex CLI for second opinions, brainstorming, or collaborative problem-solving. Use when the user asks to "consult codex", "ask codex", "get codex's opinion", "brainstorm with codex", "discuss with codex", or "chat with codex".

261 21
Explore
tobihagemann/turbo

review-tooling

Detect what dev tooling infrastructure a project has and flag gaps across linters, formatters, pre-commit hooks, test runners, and CI/CD pipelines. Returns structured findings without applying changes. Use when the user asks to "review tooling", "check project tooling", "what tooling is missing", "review dev infrastructure", or "tooling audit".

261 21
Explore
tobihagemann/turbo

create-changelog

Create a CHANGELOG.md following keepachangelog.com conventions with version history backfilled from GitHub releases or git tags. Use when the user asks to "create a changelog", "add a changelog", "initialize changelog", "start a changelog", "set up changelog", "generate changelog", or "backfill changelog".

261 21
Explore
tobihagemann/turbo

update-changelog

Update the Unreleased section of CHANGELOG.md based on current changes. No-op if CHANGELOG.md does not exist. Use when the user asks to "update changelog", "add to changelog", "update the changelog", "changelog entry", "add changelog entry", or "log this change".

261 21
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results