swarm: Command for Claude Code

.claude/commands/add_post.md

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

A command that creates and publishes an original article on swarm-ai.org/blog/. It generates the page slug, adds metadata and navigation, and checks that required financial disclaimers are included.

In plain words
What is it for?
Use it for manually written essays or research notes, including creating a new draft, adding it to the blog index, and publishing it in the site's navigation.
Why use it?
It removes the repetitive work of preparing a Markdown article for the site's documentation system. It can also import an existing draft and fix its image paths.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/add_post"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/add_post.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 490 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.00490
Opus 5 $0.00000 $0.00245
Sonnet 5 $0.00000 $0.00098
Haiku 4.5 $0.00000 $0.00049

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

Security

Grade A, and why

add_post 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 9d 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/add_post.md · 45 lines

What it actually says

/add_post

Scaffold and publish an original blog post to swarm-ai.org/blog/ — handles MkDocs slug generation, metadata headers, nav wiring, and financial-disclaimer enforcement. Use for manually-written essays and research notes; use /eval_writeup instead to auto-generate a post from a Prime Intellect eval run.

Usage

/add_post <title> [source-file]

Examples:

  • /add_post "Collusion Detection Deep Dive" (write from scratch)
  • /add_post "When Agents Collapse" path/to/draft.md (import existing file)

Behavior

  1. Derive slug from the title:
  • Lowercase, replace spaces with hyphens, strip punctuation.
  • e.g. "Collusion Detection Deep Dive" → collusion-detection-deep-dive
  1. Create the post file at docs/blog/<slug>.md:
  • If <source-file> is provided, copy its content and fix image paths to be relative to docs/blog/ (e.g. ../papers/figures/...).
  • If no source file, create a skeleton with the title as H1, a *subtitle* italic line, a --- separator, and placeholder sections.
  1. Update the blog index at docs/blog/index.md:
  • Add a bullet entry linking to the new post with the title and a one-line description.
  • Insert newest post at the top of the list.
  1. Update mkdocs.yml nav:
  • Add the new post under the Blog: nav section.
  • Place it after the index entry.
  1. Verify the build:
  • Run python -m mkdocs build --strict and report any errors.
  • If the build fails (e.g. broken image path), fix the issue before proceeding.
  1. Show what changed:
  • Print the list of files created/modified.
  • Do NOT commit or push — let the user decide when to ship (via /ship or manual commit).

Constraints

  • Never overwrite an existing post file without asking.
  • Always verify image paths resolve correctly (relative to docs/blog/).
  • If docs/blog/index.md doesn't exist, create it with a header.
  • If the Blog: section doesn't exist in mkdocs.yml nav, create it.
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. 9d ago First seen · 45 lines · 0 tokens per session scan A c9bab82d6268

Subscribe to this mod's changes

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