swarm: Skill for Claude Code

.skills/sanity-check/SKILL.md

sanity-check is a skill for Claude Code from swarm-ai-research/swarm. It costs 35 tokens per session (358 once invoked), scanned A, original, MIT.

A short preflight check for a research scenario. It validates the scenario file, runs it with small settings, and checks that the results are complete and numerically sensible.

In plain words
What is it for?
Use it to check a scenario's agents and configuration, run a small trial, inspect its output metrics, and decide whether it is ready for a full sweep.
Why use it?
It catches missing files, crashes, invalid probabilities, and non-finite values before you spend time on a larger experiment.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

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/.skills/sanity-check/SKILL.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 sanity-check

README.md
[![agentmods](https://agentmods.dev/badge/skills/swarm-ai-research/swarm/sanity-check/github.svg)](https://agentmods.dev/skills/swarm-ai-research/swarm/sanity-check)
Your own site
<a href="https://agentmods.dev/skills/swarm-ai-research/swarm/sanity-check"><img src="https://agentmods.dev/badge/skills/swarm-ai-research/swarm/sanity-check/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 sanity-check

Your own site · 80×15
<a href="https://agentmods.dev/skills/swarm-ai-research/swarm/sanity-check"><img src="https://agentmods.dev/badge/skills/swarm-ai-research/swarm/sanity-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 358 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00035 $0.00358
Opus 5 $0.00017 $0.00179
Sonnet 5 $0.00007 $0.00072
Haiku 4.5 $0.00003 $0.00036

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

Security

Grade A, and why

sanity-check 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 8d 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.

.skills/sanity-check/SKILL.md · 59 lines

What it actually says

EXECUTE NOW

Scenario: $ARGUMENTS

If no scenario provided, ask which scenario to check.


Step 1: Validate scenario file

  1. Check that the scenario file exists in scenarios/
  2. Read and parse the YAML
  3. Report: agent types, governance config, topology, epoch/step counts

Step 2: Run short

python -m swarm run scenarios/$SCENARIO --seed 42 --epochs 5 --steps 5

Step 3: Check results

  1. Verify the run completed without exceptions
  2. Read the output summary
  3. Check metric sanity:
    • p values in [0, 1]
    • Welfare is finite and reasonable
    • Toxicity rate is in [0, 1]
    • Acceptance rate is in [0, 1]
    • No NaN or Inf values

Step 4: Report

## Sanity Check: {scenario}

Status: GO / NO-GO
Runtime: {seconds}s

Metrics:
- Welfare: {value}
- Toxicity: {value}
- Acceptance rate: {value}
- Quality gap: {value}

{If NO-GO: describe the issue and suggest fix}
{If GO: ready for full sweep with --seeds N}
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. 8d ago First seen · 59 lines · 35 tokens per session scan A be9a93fc8e15

Subscribe to this mod's changes

sanity-check is a skill published in the GitHub repository swarm-ai-research/swarm (42 stars, last pushed yesterday), licensed MIT. It adds 35 tokens to every session and 358 once invoked, about $0.0002 per session on Opus 5. 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-09-03.