ship
Use when shipping code - complete workflow: merge main, run tests, multi-review with auto-fix, commit, push, create PR. Replaces manual commit-push-pr flows.
What this skill does
# Ship Complete shipping workflow. When the user says "ship it", DO IT — don't ask for confirmation at every step. Only stop for: merge conflicts, test failures, ASK items from review, or errors. ## Usage - `/ship` — Full workflow on current branch - `/ship --skip-tests` — Skip test step (use when tests already passed) - `/ship --skip-review` — Skip multi-review (use for trivial changes) - `/ship --quick` — Skip both tests and review (docs-only, typo fixes) ## Pre-flight 1. **Branch check**: If on main/master, STOP. Tell the user to create a feature branch first. Do not create branches for them — that's a decision about naming and scope. 2. **Detect base branch**: Check `git remote show origin` or common names (main, master, develop). This is the merge target. 3. **Check for uncommitted changes**: If there are unstaged/staged changes, note what will be included. Stash them before merging if git would refuse the merge, then unstash after. ## Step 1: Merge latest base branch Use `git rev-parse --abbrev-ref origin/HEAD` (fast, local) to detect the base branch. ``` git fetch origin <base> git merge origin/<base> ``` If merge conflicts occur, STOP and report them. Do not auto-resolve — merge conflicts require human judgment about which version is correct. If already up-to-date, continue silently. ## Step 2: Run tests Detect the test runner from project context: - `package.json` scripts: `test`, `test:unit`, `test:integration` - `pytest` / `python -m pytest` - `go test ./...` - `cargo test` - `mix test` - `bundle exec rspec` Run the detected test command. If tests fail: - **Pre-existing failures** (also fail on base branch): Note them, continue with a warning. These aren't your problem. - **New failures** (pass on base, fail on branch): STOP. Report which tests broke. Do not ship broken code. If no test runner is detected, skip with a note. Skip this step if `--skip-tests` or `--quick` was passed. ## Step 3: Multi-review with fix-first Invoke `/multi-review balanced` (or `deep` for changes touching 10+ files). Multi-review runs parallel agents, automatically fixes unambiguous issues, and reports what was Fixed, Wontfix, and Deferred. Any auto-fixed changes will be included in the commit. If review surfaces items requiring user decision (ASK tier), STOP and present them before continuing. Skip this step if `--skip-review` or `--quick` was passed. ## Step 4: Version bump + changelog (optional) Only if the project has these files: - **VERSION file**: Detect change magnitude from diff: - Docs/comments only → no bump - Bug fixes, small changes → patch bump - New features, API additions → minor bump - Breaking changes → ASK user for confirmation before major bump - **CHANGELOG.md**: Auto-generate entry from diff. Use the commit messages and PR description to write a human-readable summary. Prepend to the existing changelog. If neither file exists, skip silently. ## Step 5: Commit Analyze all changes (original work + auto-fixes + version bump). Create commits following the project's commit style (check recent `git log` for conventions). If the repo uses conventional commits, follow that. If it uses emoji prefixes, follow that. For large changesets, create bisectable commits — logical units, not one giant commit. Typical split: migrations → models → services → controllers → tests → version/changelog. For small changesets, one commit is fine. Always include: ``` Co-Authored-By: Claude <[email protected]> ``` ## Step 6: Push ``` git push -u origin <current-branch> ``` If push fails due to divergence, report it. Do not force-push. ## Step 7: Create PR First check if a PR already exists: `gh pr view --json url`. If it exists, skip creation and output the existing PR URL. Otherwise create with `--base <base>`: ``` gh pr create --title "<concise title>" --base <base> --body "$(cat <<'EOF' ## Summary <1-3 bullet points describing what this PR does> ## Changes <Brief description of key changes, organized logically> ## Review findings <Summary from multi-review: auto-fixed items, user decisions, wontfix items> <Omit this section if review was skipped> ## Test plan - [ ] Tests pass locally - [ ] <Specific test scenarios relevant to the changes> 🤖 Generated with [Claude Code](https://claude.com/claude-code) EOF )" ``` ## Step 8: Report Output the PR URL and a one-line summary: ``` PR #123 'Add user notifications' created on feature/notifications → main https://github.com/org/repo/pull/123 ``` ## Gates (always stop for) - On main/master branch (no branch to ship from) - Merge conflicts - New test failures - ASK items from multi-review - Push failures - PR creation failures - Major version bump confirmation ## Non-interactive philosophy This skill is designed to be invoked and left alone. The user said "ship it" — they want it shipped, not a conversation about shipping. Do the work, report the result. The only interruptions should be genuine blockers that require human judgment, not confirmations of things the user already decided by saying "ship."
Related in workflow
absolute-work
IncludedEnd-to-end, phase-gated software development lifecycle for AI agents. Turns a ticket, task, plan, or migration into a validated design, a dependency-graphed task board, and verified code. Triggers on "build this end-to-end", "plan and build", "break this into tasks", "pick up this ticket", "grill me on this", "run this migration", "absolute-work this", or any multi-step development task. Relentlessly interviews to a shared design, writes a reviewed spec, decomposes into atomic tasks on a persistent markdown board, then peels tasks one safe wave at a time with test-first verification. Handles features, bugs, refactors, greenfield projects, planning breakdowns, and migrations.
absolute-simplify
IncludedAutonomously simplifies code in your working changes or targeted files. Detects staged or unstaged git changes, analyzes for simplification opportunities following clean code and clean architecture principles, applies improvements directly, runs tests to verify nothing broke, and shows a structured summary with reasoning. Triggers on "simplify this", "refactor this", "clean up my changes", "absolute-simplify", "simplify my code", "make this cleaner", "tidy this up", "reduce complexity", "flatten this", "remove dead code", or when code needs clarity improvements, nesting reduction, or redundancy removal. Language-agnostic at base with deep opinions for JS/TS/React, Python, and Go.
sentry-sdk-upgrade
IncludedUpgrade the Sentry JavaScript SDK across major versions. Use when asked to upgrade Sentry, migrate to a newer version, fix deprecated Sentry APIs, or resolve breaking changes after a Sentry version bump.
when-using-advanced-swarm-use-swarm-advanced
IncludedAdvanced swarm patterns with dynamic topology switching and self-organizing behaviors for complex multi-agent coordination
development-workflow
IncludedDetailed development workflow with modular patterns for git, review, testing, and deployment.
project-execution
IncludedExecutes implementation plans with progress tracking, checkpoint validation, and quality gates. Use after planning is complete and tasks are ready to implement.