swarm: Command for Claude Code

.claude/commands/release.md

release is a command for Claude Code from swarm-ai-research/swarm. It costs 0 tokens per session (1,524 once invoked), scanned C, original, MIT.

A release command for the swarm-safety project that updates versions, prepares a changelog, creates a release pull request, tags the main branch, and follows the automated publishing process. PyPI is the main package index for Python software, and GitHub releases attach published versions to a repository.

In plain words
What is it for?
Creating a versioned release, checking release dependencies and test extras, starting the GitHub Actions pipeline, publishing to PyPI, creating a GitHub release, and recovering from a failed tag run.
Why use it?
It coordinates the many checks needed for a release and helps diagnose failures before or after tagging. This reduces the chance of waiting through a long CI run only to discover that publishing cannot proceed.

Command for Claude Code

Written for Claude Code: installed under .claude/.

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/release.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 release

README.md
[![agentmods](https://agentmods.dev/badge/commands/swarm-ai-research/swarm/release.svg)](https://agentmods.dev/commands/swarm-ai-research/swarm/release)
Your own site
<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/release"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/release.svg" alt="Measured on agentmods" 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 1,524 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.01524
Opus 5 $0.00000 $0.00762
Sonnet 5 $0.00000 $0.00305
Haiku 4.5 $0.00000 $0.00152

Measured 7d ago against content hash ef2978801f38, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade C, and why

release scanned grade C with 2 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 7d 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -s https://pypi.org/pypi/swarm-safety/json | python -c "import sys,json;print('PyPI latest:', json.load(sys.stdin)['info']['version'])"

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s https://pypi.org/pypi/swarm-safety/json | python -c "import sys,json;print('PyPI latest:', json.load(sys.stdin)['info']['version'])"
.claude/commands/release.md · 83 lines

How it starts

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

/release

Cut a swarm-safety release end-to-end: bump versions, finalize the CHANGELOG via a Release PR, tag main, and shepherd the release.yml pipeline through to the PyPI publish and GitHub release — then verify it actually landed.

Pushing a v* tag triggers .github/workflows/release.yml: validate → test → build → publish (PyPI, OIDC trusted publishing) → github-release. This command's job is to make that pipeline succeed on the first tag and to recover cleanly if it doesn't.

Usage

/release [version] [--commit SHA]

Examples:

  • /release (minor-bump from the latest tag, confirm with user)
  • /release 1.9.0
  • /release --recover (a tag exists but its run failed before publishing — re-validate, fix, re-point the tag)

Critical invariants (these silently broke 1.6.0–1.8.0)

Before tagging, confirm all three or the publish will fail after a 10–60 min CI run:

  1. release.yml test extras — the test job must install .[dev,runtime,api,analysis,gamescape] (matches ci.yml). A bare .[dev,runtime] misses matplotlib etc. → 14 collection errors → build/publish silently skipped.
  2. No direct-URL deps in pyproject.toml — PyPI rejects PEP 508 direct refs (pkg @ git+https://…) with a 400 after build. Keep such deps out of declared extras (document a manual install instead).
  3. release.yml test runs -n auto --dist=loadfile --timeout=300 — serial + no timeout means ~60 min and a networked test can hang forever.

Steps

  1. Pre-flight: be on main, clean tree, synced (git fetch origin main; HEAD == origin/main). Determine the version: default = minor bump of git tag -l 'v*' --sort=-v:refname | head -1; confirm with the user. Must be valid semver.

  2. Bump versions — run /bump_version <X.Y.Z> (updates pyproject.toml, CITATION.cff, skill.md). All three MUST match the tag, or validate fails.

  3. Finalize CHANGELOG — roll ## [Unreleased]## [X.Y.Z] - <YYYY-MM-DD>, add a fresh empty ## [Unreleased]. Read the diffs since the last tag and write human-quality entries under ### Added/Changed/Fixed/Removed.

Read the full file on GitHub · 83 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. 7d ago First seen · 83 lines · 0 tokens per session scan C ef2978801f38

Subscribe to this mod's changes

release 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 1,524 tokens. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.