swarm: Skill for Claude Code

.skills/experiment-loop/SKILL.md

experiment-loop is a skill for Claude Code from swarm-ai-research/swarm. It costs 45 tokens per session (600 once invoked), scanned A, original, MIT.

A guided workflow for running a complete research experiment, from stating a hypothesis through testing, result synthesis, and reviewing the final claim.

In plain words
What is it for?
Use it to design experiment parameters, run sanity checks and sweeps, create artifacts, and review evidence for a claim.
Why use it?
It organizes the stages that can otherwise be skipped or performed inconsistently during an 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/experiment-loop/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 experiment-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/swarm-ai-research/swarm/experiment-loop.svg)](https://agentmods.dev/skills/swarm-ai-research/swarm/experiment-loop)
Your own site
<a href="https://agentmods.dev/skills/swarm-ai-research/swarm/experiment-loop"><img src="https://agentmods.dev/badge/skills/swarm-ai-research/swarm/experiment-loop.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 600 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.00045 $0.00600
Opus 5 $0.00023 $0.00300
Sonnet 5 $0.00009 $0.00120
Haiku 4.5 $0.00005 $0.00060

Measured 4d ago against content hash 55be6310937d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

experiment-loop 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 4d 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/experiment-loop/SKILL.md · 86 lines

How it starts

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

EXECUTE NOW

Hypothesis: $ARGUMENTS

If no hypothesis provided, check memory at .letta/memory/threads/current.md for the active thread.


Step 1: Design

  1. State the hypothesis as a testable proposition
  2. Identify which governance knobs and scenario parameters are relevant
  3. Propose the sweep matrix:
    • Parameter(s) to sweep and their values
    • Number of seeds (10 for exploratory, 50 for publication)
    • Epochs and steps per epoch
  4. Check if a similar scenario already exists in scenarios/:
    • If yes, propose modifications
    • If no, draft a new scenario YAML
  5. Define success/failure metrics before running

Present the design and wait for user approval before proceeding.

Step 2: Sanity check

Run a short version first:

python -m swarm run scenarios/<name>.yaml --seed 42 --epochs 10 --steps 10

Verify:

  • No crashes or exceptions
  • Metrics are in expected range
  • The scenario tests what we think it tests

If sanity check fails, diagnose and fix before proceeding.

Step 3: Full run

Run the full experiment:

python -m swarm sweep scenarios/<name>.yaml --seeds <N>

Or for single runs:

python -m swarm run scenarios/<name>.yaml --seed 42 --epochs <E> --steps <S>

After completion:

  1. Verify run.yaml was generated in the output directory
  2. Log to SQLite: check if /log_run should be invoked
  3. Copy run folder to swarm-artifacts if publication-quality

Step 4: Synthesize

  1. Run the synthesize skill on the completed run
  2. Review claim update recommendations
  3. Present findings to user

Step 5: Update memory

Append to .letta/memory/threads/research-log.md:

## {date} — {hypothesis short name}

**Ran:** {experiment description}
**Found:** {key results with effect sizes}
**Learned:** {what this changes about our understanding}
**Next:** {what to investigate next}
**Run pointers:** {run_id}

Update .letta/memory/threads/current.md with next steps. Update .letta/memory/runs/latest.md with the new run pointer.

Read the full file on GitHub · 86 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. 4d ago First seen · 86 lines · 45 tokens per session scan A 55be6310937d

Subscribe to this mod's changes

experiment-loop is a skill published in the GitHub repository swarm-ai-research/swarm (41 stars, last pushed today), licensed MIT. It adds 45 tokens to every session and 600 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.