swarm: Command for Claude Code

.claude/commands/ship.md

ship is a command for Claude Code from swarm-ai-research/swarm. It costs 0 tokens per session (3,945 once invoked), scanned A, original, MIT.

A command that commits changes to Git and pushes them to the remote repository. It can optionally run lint fixes, run tests, stage safe batches, or close project-tracking items before pushing.

In plain words
What is it for?
Committing and pushing current changes, fixing lint or type-check issues first, running tests, batching session output, and closing tracked work items.
Why use it?
It combines common release steps and can stop before committing when requested checks fail.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths.

This is swarm-ai-research/swarm's own configuration. It tells Claude Code how to work on swarm itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything swarm configures →

Reuse

Borrowing it

Nothing to install: this file belongs to swarm-ai-research/swarm. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/swarm-ai-research/swarm/main/.claude/commands/ship.md
Clone the repo
git clone --depth 1 https://github.com/swarm-ai-research/swarm

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ship

README.md
[![agentmods](https://agentmods.dev/badge/commands/swarm-ai-research/swarm/ship/github.svg)](https://agentmods.dev/commands/swarm-ai-research/swarm/ship)
Your own site
<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/ship"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/ship/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ship

Your own site · 80×15
<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/ship"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/ship.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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 3,945 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.03945
Opus 5 $0.00000 $0.01972
Sonnet 5 $0.00000 $0.00789
Haiku 4.5 $0.00000 $0.00394

Measured 9d ago against content hash ee8779be4749, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 9d 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 · 278 lines

How it starts

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

/ship

Commit and push in one shot. Consolidates the former /commit_push, /fix_commit, /sweep_and_ship, and /close_and_ship commands.

Usage

/ship [options] [commit message]

Examples:

  • /ship (auto-generates commit message from diff)
  • /ship "Fix typo in governance config"
  • /ship --fix "Add PettingZoo bridge" (auto-fix lint/mypy before committing)
  • /ship --test "Fix governance vulnerabilities" (run tests before committing)
  • /ship --fix --test "Add PettingZoo bridge" (auto-fix lint/mypy, then run tests)
  • /ship --all "Batch commit session output" (stage everything safe)
  • /ship --close b6t b7x "Finish live integration tests" (close beads + commit + push)
  • /ship --fix --close b6t (auto-fix, close beads, commit, push)
  • /ship --research-close (update research memory, then commit + push)
  • /ship --research-close "Finished governance knob sweep" (with explicit message)

Argument parsing

Parse $ARGUMENTS to extract:

  • --fix: Enable ruff/mypy auto-fix with retry loop (up to 3 attempts)
  • --test [path]: Run pytest before committing. If tests fail, stop and report (never auto-fix tests). Optional path restricts to specific test file/directory (e.g. --test tests/test_governed_swarm.py). Without a path, runs full suite with pytest -x -q.
  • --all: Stage all modified + untracked files (excluding secrets/junk), not just already-staged ones
  • --close <bead-ids...>: Close specified beads before committing. Bead IDs are tokens matching distributional-agi-safety-* or similar short IDs. Collect all bead IDs that follow --close until the next flag or quoted string.
  • --research-close: Run the research session close ritual (Phase 0) before committing. Updates memory files with session summary, active thread, and run pointers.
  • --no-push: Commit only, skip push step
  • Everything else in quotes (or the remaining non-flag text) is the commit message.

Flag combinations: --fix --test runs lint/mypy auto-fix first (Phase 3), then tests (Phase 3.5). If --fix succeeds but tests fail, stop and report — never auto-fix test failures.

Read the full file on GitHub · 278 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. 9d ago First seen · 278 lines · 0 tokens per session scan A ee8779be4749

Subscribe to this mod's changes

ship is a command published in the GitHub repository swarm-ai-research/swarm (41 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,945 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.