| name | claude-autoship |
| description | Chains implement → verify → review → ship after a feature plan is approved. Reads the plan for the current branch, runs the full pipeline in one session, and stops on any failure or non-minor review finding. Use when asked to "autoship", "ship this feature end to end", or "run the chain". Do NOT auto-trigger. Requires an approved plan file. |
| disable-model-invocation | true |
Claude autoship
Chain the post-plan pipeline in a single run. Every step has a stop condition. State is always recoverable on stop: code lives on the branch, review output on disk, plan still linked.
Guards
- All
.claude/plans/ and .claude/review/ reads resolve at the main worktree root, not the current worktree. See Worktrees in CLAUDE.md.
- Run
git branch --show-current and replace / with - to derive <slug>. If empty, stop: ❌ Detached HEAD. Checkout the feature branch first.
- If
.claude/plans/feature-<slug>.md does not exist at the main worktree root, stop: ❌ No approved plan at .claude/plans/feature-<slug>.md. Run /claude-feature first.
- If the working tree has uncommitted changes unrelated to the plan, stop:
❌ Uncommitted changes outside the plan. Commit or stash before autoshipping.
Step 0: enter a worktree
If git rev-parse --git-dir equals git rev-parse --git-common-dir, the session is in the main worktree. Invoke toolkit:claude-worktree before continuing. The wrapper handles name derivation and branch alignment. Do not call EnterWorktree directly.
If neither command resolves, stop: ❌ Not a git repository. Autoship needs git or a WorktreeCreate hook.
If the two commands differ, the session is already in a linked worktree. Continue.
Step 1: read the plan
Read .claude/plans/feature-<slug>.md at the main worktree root. This file is the scope for this run.
Step 2: implement
Implement only what the plan describes. Do not expand scope. Do not refactor neighbors. Do not touch files outside the plan's "Files to touch" list without reason.
Step 3: verify
Run the verify commands defined in CLAUDE.md (lint, typecheck, tests). On failure:
- Make one fix attempt targeting the reported errors
- Re-run only the failing command
- If it still fails, stop:
❌ Verify failed after one fix attempt. Review logs and retry manually.
Do not loop. Do not bypass hooks.
Step 4: UI test (conditional)
If the diff touches UI files (JSX, TSX, Vue, Svelte, HTML, or CSS under src/), invoke toolkit:claude-ui-test.
If claude-ui-test produces a manual checklist, stop: ❌ UI requires visual verification. Checklist at .claude/review/ui-checklist-<slug>.md. Verify manually, then run /git-ship.
If all UI changes are covered by e2e tests, continue.
Step 5: review
Classify the diff first. Run git diff main --name-only (or git diff --staged --name-only when staged). If every changed file matches *.md or *.txt, skip review entirely and continue to Step 7. Prose-only changes are already gated by docs-sync, claude-standards-audit, and pre-push hooks. Running a code-style review on them burns tokens with no signal.
Otherwise invoke toolkit:claude-review.
Step 6: evaluate findings
Skip this step if Step 5 was skipped (prose-only diff). Otherwise read .claude/review/review-<slug>.md at the main worktree root. Parse the summary line (X critical, Y should-fix, Z minor):
- Any critical or should-fix count greater than zero, stop:
❌ Review found non-minor issues. See .claude/review/review-<slug>.md. Fix and run /git-ship.
- Zero critical and zero should-fix, continue. The minor findings stay in the on-disk review receipt. Fold any a reviewer needs into the PR's
## Technical Context. Do not add a separate review-notes section to the PR body.
Do not auto-fix findings. The stop here is deliberate.
Step 7: ship
Invoke each sub-skill in order via the Skill tool. After each returns, invoke the next immediately. Do not output text between steps.
toolkit:claude-docs: sync .claude/ planning docs against session decisions
toolkit:docs-sync: sync public docs against changes since main
- Run
git add -A to stage files the sync skills wrote
toolkit:git-stage: group staged changes and commit by concern
toolkit:git-branch: rename the branch to conventional format
toolkit:git-pr: push and open the pull request
After the PR is created, mark it as draft:
gh pr ready --undo
toolkit:claude-memory-capture: extract durable patterns from the session into .claude/memory/
toolkit:claude-memory-review: if claude-memory-capture wrote or updated at least one entry this session, propose fixes scoped to those entries, writing the decision-ready receipt while session context is fresh. Skip when capture wrote nothing.
Stop at the Propose phase. Do not run Apply. Promoting an entry to CLAUDE.md or a skill body mutates how the agent operates and ships as its own change, separate from this feature.
Output
Respond with up to four lines:
✅ Autoshipped (draft): <PR url>
<N minor findings kept in .claude/review/review-<slug>.md>
<N memories captured in .claude/memory/>
<Memory proposal at .claude/review/memory-review-<slug>.md>
Omit the second line if there were no minor findings. Omit the third and fourth lines if claude-memory-capture wrote nothing this session, since no captures means no scoped review and no proposal.
Failure recovery
Every stop point leaves recoverable state. The user resumes manually from the appropriate step.
| Stop point | Recovery |
|---|
| No plan | Run /claude-feature to create one |
| Branch collision on worktree entry | claude-worktree Step 5 found <slug> already as a local branch. Resolve manually (rename or delete the stale branch), then re-run autoship. |
| Verify fails | Read logs, fix manually, run /git-ship |
| UI checklist | Verify visually, run /git-ship |
| Review findings | Fix findings, run /git-ship |
| git-ship fails | Inspect hook or remote error, run again |