ship

An automated command for preparing and publishing code changes to the main branch, the shared branch used for the current codebase. It formats code, updates documentation, checks for exposed secrets, commits the changes, and pushes them.

In plain words
What is it for?
Run the final checks and publish completed changes to the remote repository, including formatting, documentation updates, secret scanning, committing, and pushing.
Why use it?
It combines routine release steps and stops if it finds passwords, tokens, or other secrets. It also refuses to continue when the work is not on the main branch.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/sprklai/zenii/ship
Clone the repo
git clone --depth 1 https://github.com/sprklai/zenii

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,121 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02121
Opus 5 $0.00000 $0.01060
Sonnet 5 $0.00000 $0.00424
Haiku 4.5 $0.00000 $0.00212

Measured 3d ago against content hash ddcc2297ff4f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ship scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/ship.md · 160 lines

How it starts

The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Format, Update Docs, Scan Secrets, Commit & Push to Main

This command formats the code, updates documentation to reflect changes, scans for leaked secrets, commits, and pushes to the remote main branch. It will REFUSE to proceed if any secrets or tokens are detected. It runs fully automatically with NO user prompts unless secrets are found.

Instructions

Follow these steps strictly and sequentially. Stop immediately if any step fails. Do NOT ask the user for confirmation between steps — proceed automatically unless a secret is detected.

Step 1: Verify branch

Run git branch --show-current to confirm we are on the main branch. If NOT on main, STOP and tell the user: "You are on branch X, not main. Switch to main first or confirm you want to push from this branch."

Step 2: Format the code

Run the following formatters:

cargo fmt --all

If a web/ directory exists with a package.json, also run:

cd web && bun run format 2>/dev/null || npx prettier --write . 2>/dev/null; cd -

Step 3: Check i18n

If a web/ directory exists with project.inlang/settings.json, run:

cd web && bun run check

This runs svelte-kit sync && svelte-check which validates paraglide i18n message keys, types, and compiled output. If there are errors (missing message keys, type mismatches, stale paraglide output), fix them before proceeding. Do NOT ask the user — just fix and re-run.

Step 4: Run lints

Run cargo clippy --workspace to catch lint issues. If there are warnings or errors, fix them before proceeding. Do NOT ask the user — just fix and re-run.

Step 5: Update documentation

Review the staged and unstaged changes (use git diff and git diff --cached) to understand what has changed since the last commit. Then update the following documentation files only if the code changes warrant it — do not make gratuitous edits:

  1. README.md — Update if there are new features, removed features, changed commands, new dependencies, or altered project structure.
  2. CHANGELOG.md — Add entries for any user-facing changes (features, fixes, breaking changes). Follow the existing format and group under the current unreleased version section. Create a new section if needed.
  3. website-data.json — Sync derived metrics with the current codebase state:
    • version: read from grep -m1 '^version = "' Cargo.toml | sed 's/.*"\(.*\)".*/\1/'
    • totalEndpoints: count via bash scripts/count-endpoints.sh (reads docs/api-endpoints.md — update that file first if routes changed)
    • agentTools: count via grep -c 'registry\.register\b' crates/zenii-core/src/boot.rs
    • backendTests: count via cargo test --workspace 2>&1 | awk '/test result/{sum+=$4} END{print sum}'
    • Other fields (binarySize, debRpmSize, startupSeconds, llmProviders, messagingChannels, crates, securityLayers, platformTargets, compileFlags) — update manually only if the code changes warrant it.
    • Read the current website-data.json, apply only the fields that changed, write back.
    • After writing website-data.json, read backendTests from it and update the test count badge in README.md: replace tests-<N>-blue with tests-<backendTests>-blue and alt="<N> tests" with alt="<backendTests> tests".
    • If totalEndpoints changed, update only the route count in the GitHub repo description (preserve everything else):
      ENDPOINTS=$(jq '.totalEndpoints' website-data.json)
      CURRENT_DESC=$(gh repo view sprklai/zenii --json description -q '.description')
      NEW_DESC=$(echo "$CURRENT_DESC" | sed "s/[0-9]\+ API \(routes\|endpoints\)/${ENDPOINTS} API endpoints/")
      gh repo edit sprklai/zenii --description "$NEW_DESC"
      
  4. docs/ directory — Update relevant docs if the changes affect:
    • docs/architecture.md — new modules, traits, data flows, or structural changes
    • docs/phases.md — phase status changes or deliverable updates
    • docs/processes.md — process flow changes
    • docs/cli-reference.md — new or changed CLI commands/flags
    • Any other doc that describes behavior that has changed

Read the full file on GitHub · 160 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 160 lines · 0 tokens per session scan A ddcc2297ff4f

Subscribe to this mod's changes

ship is a command published in the GitHub repository sprklai/zenii (23 stars, last pushed 24d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,121 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.