benchmark

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

A command that runs the SWARM Track A multi-agent benchmark, a repeatable set of tasks and conditions for measuring how software agents behave, then compiles the results into a PDF unless disabled.

In plain words
What is it for?
Use it for quick checks, baseline or adversarial runs, full benchmark runs, reproducible seeds, difficulty settings, and results prepared for research or paper submission.
Why use it?
It provides standardized comparison data instead of relying on informal tests when evaluating agents or model versions.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Not installable on its own: it runs a file from its repository that does not travel with it. Clone the repository, or install whatever ships that file. The line is python scripts/run_swarm_track_a.py --tasks $TASKS --difficulty 0.5 $FLAGS.

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

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 benchmark

README.md
[![agentmods](https://agentmods.dev/badge/commands/swarm-ai-research/swarm/benchmark.svg)](https://agentmods.dev/commands/swarm-ai-research/swarm/benchmark)
Your own site
<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/benchmark"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/benchmark.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 654 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.1 $0.00000 $0.00654
Opus 5 $0.00000 $0.00327
Sonnet 5 $0.00000 $0.00131
Haiku 4.5 $0.00000 $0.00065

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

Security

Grade A, and why

benchmark 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 6d 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/benchmark.md · 87 lines

How it starts

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

/benchmark

Run the SWARM Track A multi-agent benchmark suite (standardized task conditions, governance presets, behavioral assessments) and auto-compile results to PDF — use when evaluating agent behavior against reproducible baselines before paper submission, or to generate comparison data across model variants. Distinct from /run_scenario (single scenario, single seed), /sweep (parameter grid without analysis), and /full_study (end-to-end pipeline including paper scaffolding).

Usage

/benchmark [preset] [options]

Presets

Preset Tasks Conditions Description
quick 50 baseline only Fast smoke test
baseline 500 baseline only Full baseline benchmark
adversarial 500 adversarial only Adversarial conditions only
full 500 all Baseline + adversarial (default)

Options

  • --no-pdf - Skip PDF compilation
  • --no-commit - Skip committing artifacts
  • --difficulty N - Set task difficulty (0-1, default 0.5)
  • --seed N - Set random seed

Implementation

When user invokes /benchmark, run:

# Parse preset
PRESET="${1:-full}"
TASKS=500
FLAGS=""

case "$PRESET" in
    quick)
        TASKS=50
        ;;
    baseline)
        # baseline only (default, no extra flags)
        ;;
    adversarial)
        FLAGS="--adversarial-only"
        ;;
    full)
        FLAGS="--adversarial"
        ;;
esac

# Run benchmark
python scripts/run_swarm_track_a.py --tasks $TASKS --difficulty 0.5 $FLAGS

# Get output directory from last line
RUN_DIR=$(ls -td runs/swarm_collate/track_a_* | head -1)
echo "Run completed: $RUN_DIR"

# Compile PDF unless --no-pdf
if [[ ! " $* " =~ " --no-pdf " ]]; then
    cd "$RUN_DIR"
    tectonic paper.tex 2>/dev/null || /opt/anaconda3/bin/tectonic paper.tex
    open paper.pdf
fi

# Commit unless --no-commit
if [[ ! " $* " =~ " --no-commit " ]]; then
    cd -
    git add "$RUN_DIR"
    git commit --no-verify -m "Add Track A benchmark run: $(basename $RUN_DIR)"
fi

Read the full file on GitHub · 87 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. 6d ago First seen · 87 lines · 0 tokens per session scan A 98dc47e06e78

Subscribe to this mod's changes

benchmark 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 654 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.