Install the temporary /ship slash command as a personal Claude Code command #227

Open
opened 2026-11-26 22:22:43 +00:00 by Claude · 0 comments
Owner

/ship is a personal Claude Code slash command. It takes the plan already in the conversation and runs it end to end with subagents: implement → clean-context review (looped) → push and PR → watch CI and fix failures → update the PR → one final report.

It is temporary until map #166 is done. It is deliberately not part of any holocron plugin: it runs one lead across stages, the pattern ADR-0031 rejected for the delivery team. Install it per user, as below, and remove it once #166 lands.

What it does

  • Input: the plan already in the conversation. With no plan in context, it stops and asks.
  • Implement: subagents, in parallel when they touch different files, sequential otherwise.
  • Review: a fresh subagent with no inherited context, given the plan and the diff only. Loops until there are no blocking findings; capped at 3 rounds.
  • Push and PR: invoking /ship authorizes creating a feature branch, commits, normal pushes to it, and opening or updating the PR. Force-push, push to the default branch, merge and delete always stop and ask. It never merges.
  • CI: polled every 120 s without filling the main context (a background poll written on the spot, never saved or committed, or a polling subagent). Failures go to a fix subagent; capped at 3 rounds.
  • Communication: silent except for stop-and-ask questions and one final report (PR link, what changed, review rounds, CI result, open notes).
  • Only you can start it: disable-model-invocation: true stops Claude from launching /ship on its own. Without it, Claude could start a command that pushes and opens PRs from a casual "go ahead and build that".

Install

Personal commands live in ~/.claude/commands/, and the file name becomes the command name. This makes /ship available in every repo on the host.

mkdir -p ~/.claude/commands
cat > ~/.claude/commands/ship.md <<'EOF'
---
description: Execute the plan in context with subagents — implement, clean-context review, push, PR, watch CI, report
disable-model-invocation: true
---

Execute the plan already in this conversation. If there is no plan in context, stop and ask for one.

You are the orchestrator. Delegate the work to subagents and keep your own context lean: give each
subagent a tight brief and take back only its conclusion. Do not narrate to the user between steps.
Speak to the user only to stop and ask (see below) or to give the final report.

## Loop

1. **Implement** — dispatch subagents for the plan's steps. Run them in parallel when they touch
   different files and sequentially when they depend on each other or share files. Tell them to use
   the repo's relevant skills (for example `git-commits`) and to follow its AGENTS.md. If you are on
   the default branch, create a feature branch first.
2. **Review** — dispatch a fresh subagent with no inherited context. Give it the plan and the
   diff against the base branch, not the implementers' summaries. Ask it for blocking and
   non-blocking findings.
3. Blocking findings → send them to implementer subagents, then review again with a new
   clean-context subagent. Cap: 3 implement→review rounds, then stop and ask.
4. **Push and PR** — push the feature branch and open a PR (use the `gitea-prs` skill on Gitea
   remotes). Invoking `/ship` authorizes these: creating the branch, commits, normal pushes to it,
   and opening or updating the PR.
5. **Watch CI** — without filling your context: either run a background poll you write on the spot
   (every 120 s, exits when CI finishes, never saved to the repo or committed) or dispatch a
   subagent to do the polling. If CI fails, a fix subagent diagnoses and fixes it, you push, and you
   watch again. Cap: 3 CI fix rounds, then stop and ask.
6. **Finish** — when CI is green, update the PR title and description if they no longer match the
   change.

## Stop and ask when

- the plan is ambiguous or the work would go outside the plan's scope
- a finding needs a design decision
- a secret or credential turns up
- a round cap is hit
- an action is irreversible beyond the authorization above: force-push, push to the default branch,
  merge, or delete. Never merge.

## Final report

Short: PR link, what changed, number of review rounds, CI result, and open notes or non-blocking
findings.
EOF

The quoted 'EOF' stops the shell from expanding anything inside the prompt, so the file is written exactly as shown.

Verify

  1. Start a new Claude Code session, or restart the current one.
  2. Type / and check that ship is listed with the description above.

Notes

  • Repos without the gitea plugin (e.g. kamino): the gitea-prs skill named in step 4 is not installed there. The agent has to fall back to whatever Gitea access the repo has. If that becomes a problem, edit step 4 in your local copy.
  • Already installed the earlier version? Add disable-model-invocation: true below the description: line in ~/.claude/commands/ship.md, or re-run the install block. The line was added on 2026-11-27.
  • Companion command: /next (#240) ranks the repo's open issues, lets you pick one, and plans it for /ship. Because of this frontmatter line, /next tells you to run /ship rather than invoking it.
  • Uninstall: rm ~/.claude/commands/ship.md once map #166 is done.
`/ship` is a personal Claude Code slash command. It takes the plan already in the conversation and runs it end to end with subagents: implement → clean-context review (looped) → push and PR → watch CI and fix failures → update the PR → one final report. It is **temporary until map #166 is done**. It is deliberately **not** part of any holocron plugin: it runs one lead across stages, the pattern ADR-0031 rejected for the delivery team. Install it per user, as below, and remove it once #166 lands. ## What it does - **Input:** the plan already in the conversation. With no plan in context, it stops and asks. - **Implement:** subagents, in parallel when they touch different files, sequential otherwise. - **Review:** a fresh subagent with no inherited context, given the plan and the diff only. Loops until there are no blocking findings; capped at 3 rounds. - **Push and PR:** invoking `/ship` authorizes creating a feature branch, commits, normal pushes to it, and opening or updating the PR. Force-push, push to the default branch, merge and delete always stop and ask. It never merges. - **CI:** polled every 120 s without filling the main context (a background poll written on the spot, never saved or committed, or a polling subagent). Failures go to a fix subagent; capped at 3 rounds. - **Communication:** silent except for stop-and-ask questions and one final report (PR link, what changed, review rounds, CI result, open notes). - **Only you can start it:** `disable-model-invocation: true` stops Claude from launching `/ship` on its own. Without it, Claude could start a command that pushes and opens PRs from a casual "go ahead and build that". ## Install Personal commands live in `~/.claude/commands/`, and the file name becomes the command name. This makes `/ship` available in every repo on the host. ```bash mkdir -p ~/.claude/commands cat > ~/.claude/commands/ship.md <<'EOF' --- description: Execute the plan in context with subagents — implement, clean-context review, push, PR, watch CI, report disable-model-invocation: true --- Execute the plan already in this conversation. If there is no plan in context, stop and ask for one. You are the orchestrator. Delegate the work to subagents and keep your own context lean: give each subagent a tight brief and take back only its conclusion. Do not narrate to the user between steps. Speak to the user only to stop and ask (see below) or to give the final report. ## Loop 1. **Implement** — dispatch subagents for the plan's steps. Run them in parallel when they touch different files and sequentially when they depend on each other or share files. Tell them to use the repo's relevant skills (for example `git-commits`) and to follow its AGENTS.md. If you are on the default branch, create a feature branch first. 2. **Review** — dispatch a fresh subagent with no inherited context. Give it the plan and the diff against the base branch, not the implementers' summaries. Ask it for blocking and non-blocking findings. 3. Blocking findings → send them to implementer subagents, then review again with a new clean-context subagent. Cap: 3 implement→review rounds, then stop and ask. 4. **Push and PR** — push the feature branch and open a PR (use the `gitea-prs` skill on Gitea remotes). Invoking `/ship` authorizes these: creating the branch, commits, normal pushes to it, and opening or updating the PR. 5. **Watch CI** — without filling your context: either run a background poll you write on the spot (every 120 s, exits when CI finishes, never saved to the repo or committed) or dispatch a subagent to do the polling. If CI fails, a fix subagent diagnoses and fixes it, you push, and you watch again. Cap: 3 CI fix rounds, then stop and ask. 6. **Finish** — when CI is green, update the PR title and description if they no longer match the change. ## Stop and ask when - the plan is ambiguous or the work would go outside the plan's scope - a finding needs a design decision - a secret or credential turns up - a round cap is hit - an action is irreversible beyond the authorization above: force-push, push to the default branch, merge, or delete. Never merge. ## Final report Short: PR link, what changed, number of review rounds, CI result, and open notes or non-blocking findings. EOF ``` The quoted `'EOF'` stops the shell from expanding anything inside the prompt, so the file is written exactly as shown. ## Verify 1. Start a new Claude Code session, or restart the current one. 2. Type `/` and check that `ship` is listed with the description above. ## Notes - **Repos without the `gitea` plugin (e.g. kamino):** the `gitea-prs` skill named in step 4 is not installed there. The agent has to fall back to whatever Gitea access the repo has. If that becomes a problem, edit step 4 in your local copy. - **Already installed the earlier version?** Add `disable-model-invocation: true` below the `description:` line in `~/.claude/commands/ship.md`, or re-run the install block. The line was added on 2026-11-27. - **Companion command:** `/next` (#240) ranks the repo's open issues, lets you pick one, and plans it for `/ship`. Because of this frontmatter line, `/next` tells you to run `/ship` rather than invoking it. - **Uninstall:** `rm ~/.claude/commands/ship.md` once map #166 is done.
Claude added the Kind/Documentation
Priority
Low
4
Status/Ready for Human
labels 2026-11-26 22:22:43 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Holocron#227