swarm: Command for Claude Code

.claude/commands/scrub_id.md

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

A command for finding and removing private infrastructure identifiers from a repository. These may include run IDs, evaluation IDs, or dashboard URLs that should not appear in public files.

In plain words
What is it for?
Searching a repository for IDs or matching URL patterns, reviewing surrounding context, classifying matches, proposing replacements, cleaning public-facing files, and redeploying when needed.
Why use it?
It shows where each identifier occurs and separates public documentation from internal files and data artifacts before changes are proposed. If public files changed, it can also handle redeployment.

Command for Claude Code

Written for Claude Code: installed under .claude/. 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/scrub_id.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 scrub_id

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/scrub_id"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/scrub_id.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 632 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.00632
Opus 5 $0.00000 $0.00316
Sonnet 5 $0.00000 $0.00126
Haiku 4.5 $0.00000 $0.00063

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

Security

Grade A, and why

scrub_id 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 10d 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/scrub_id.md · 64 lines

How it starts

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

/scrub_id

Find and remove private infrastructure IDs (run IDs, eval IDs, dashboard links) from the repo and redeploy if public-facing files were changed.

Usage

/scrub_id <pattern_or_id>

Examples:

  • /scrub_id abc123def456
  • /scrub_id "app.primeintellect.ai"
  • /scrub_id id_one id_two id_three

Behavior

Phase 1: Search

  1. For each provided ID or pattern, grep the entire repo (excluding .git/, external/, runs/, node_modules/, .venv/, __pycache__/).
  2. Also grep for URL patterns containing the ID (e.g. dashboard links embedding the ID).
  3. Present all matches with file path, line number, and surrounding context (3 lines).

Phase 2: Classify matches

Categorize each match as:

  • Public — files under docs/, blog posts, README, any .md served by the site. These are highest priority.
  • Internal — command templates (.claude/commands/), scripts, config. Lower priority but still worth cleaning.
  • Data — run artifacts, logs, CSVs. Usually gitignored; flag but don't auto-edit.

Phase 3: Edit

For each match, propose a replacement:

  • Dashboard URLs: remove the entire link, keep descriptive text (e.g. "Full logs on the Prime dashboard" becomes "Trained on Prime Intellect")
  • Bare run/eval IDs: replace with a generic placeholder (e.g. "your-external-run-id") or remove the line
  • IDs in code examples: replace with "your-run-id" or similar

Ask the user to confirm before editing. Apply edits.

Phase 4: Verify

After edits:

  1. Re-grep for each pattern to confirm zero remaining matches.
  2. If any public-facing files (docs/**, *.md in repo root) were modified, prompt to run /deploy_blog.

Phase 5: Commit

Stage the changed files and commit with message:

Remove private infrastructure IDs from <list of affected areas>

Push if the user confirms.

Also check the live site

If the scrubbed content was in a blog post or docs page, use WebFetch to verify the live site at https://www.swarm-ai.org/ still shows the old (cached) content, and confirm that a redeploy will fix it.

Read the full file on GitHub · 64 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. 10d ago First seen · 64 lines · 0 tokens per session scan A 2c741a5f847b

Subscribe to this mod's changes

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