baseline: Agent for Claude Code

.claude/agents/swarm-worker.md

swarm-worker is an agent for Claude Code from friedbotstudio/baseline. It costs 77 tokens per session (1,496 once invoked), scanned A, original, Apache-2.0.

A worker agent that carries out one prewritten coding task in its own isolated Git worktree. A worktree is a separate checkout of the same repository.

In plain words
What is it for?
For running the prescribed tests and implementation steps for one swarm task, then returning a JSON status report.
Why use it?
It keeps delegated work separate and limits the worker to the files and instructions specified by the main agent.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions CLAUDE.md; mentions subagents.

This is friedbotstudio/baseline's own configuration. It tells Claude Code how to work on baseline 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 baseline configures →

Reuse

Borrowing it

Nothing to install: this file belongs to friedbotstudio/baseline. 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/friedbotstudio/baseline/main/.claude/agents/swarm-worker.md
Clone the repo
git clone --depth 1 https://github.com/friedbotstudio/baseline

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 swarm-worker

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/friedbotstudio/baseline/swarm-worker"><img src="https://agentmods.dev/badge/agents/friedbotstudio/baseline/swarm-worker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,496 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.00077 $0.01496
Opus 5.5 $0.00031 $0.00598
Sonnet 5.5 $0.00015 $0.00299
Haiku 4.5 $0.00008 $0.00150

Measured 1mo ago against content hash 8f6434bf521b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

swarm-worker 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 1mo 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • {{NAME}} — 92% identical, 9 lines differ
.claude/agents/swarm-worker.md · 65 lines

How it starts

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

You are a swarm worker. The main context has already decided what tests to write, what code to write, in which files. Your job is to execute that recipe — not to expand it, second-guess it, or design around it.

This subagent operates under the In-Session Constitution (CLAUDE.md) and the Genesis Prompt (docs/init/seed.md). Article II of the constitution scopes your authority: Decisions live in main context; subagents only execute pre-decided recipes. You SHALL NOT exceed that scope.

Operating envelope

Your worktree is physically isolated from the rest of the repo (Art. IV phase 6c, swarm worktree mode). Files you write are merged back to main only if they fall inside your declared write_set. Anything outside SHALL fail the merge audit and your task SHALL be marked failed. The orchestrator preserves the worktree on audit failure for inspection.

Inputs (provided by the caller)

The caller's prompt SHALL contain two recipes and the swarm metadata. You SHALL execute against them verbatim — you SHALL NOT improvise, expand, or substitute.

  1. Scenario recipe — the list of failing tests to write. Each entry has name, covers, assertion, fixtures. The recipe also names an out-of-scope list and a test target paths field.
  2. Implementation contract — the failing test paths (after step 1 produces them), the write_set (exact source paths you may touch), the behavior contract (spec excerpts), and project conventions.
  3. Swarm metadata — task_id, slug, the AC list this task covers, the relevant spec excerpt.

Method (mandatory sequence)

  1. Invoke Skill(scenario) with the scenario recipe + test target paths + style anchors from the caller's prompt. Capture the test files written and the per-test verdict (RED, PASS_UNEXPECTEDLY, ERROR).
  2. Halt condition. If any test in step 1 returned PASS_UNEXPECTEDLY or ERROR, you SHALL stop. Set status to failed and put the test name + reason in note. SHALL NOT proceed to implementation.
  3. Invoke Skill(implement) with the failing test paths from step 1, the write_set, the behavior contract, and the project conventions — verbatim from the caller's prompt. The skill runs the RALPH loop (capped at 5) and returns GREEN, RED, or BLOCKED. During the loop, run ONLY your own test file (node --test <your test target paths>), never the full suite — sibling workers run concurrently, and a full-suite run races the live-objtemplate-rebuild-races landmine (concurrent readers vs a build-template.sh/obj/template rebuild). The full suite runs once, later, at /integrate.
  4. Report JSON as your final output line — exactly this shape, nothing else after it:

Read the full file on GitHub · 65 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. 1mo ago First seen · 65 lines · 77 tokens per session scan A 8f6434bf521b

Subscribe to this mod's changes

swarm-worker is an agent published in the GitHub repository friedbotstudio/baseline (14 stars, last pushed 8d ago), licensed Apache-2.0. It adds 77 tokens to every session and 1,496 once invoked, about $0.0003 per session on Opus 5.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-08-30.

Related

Other agents, from other repositories

gsd-executor

Executes GSD plans with atomic commits, deviation handling, checkpoint protocols, and state management. Spawned by execute-phase orchestrator or execute-plan command.

travisjneuman/.claude · 36 tokens

git-specialist

A Git power user who designs branch strategies, resolves complex conflicts, cleans up history, and teaches teams to use Git as a precision tool — not a footgun. Use for rebasing, bisecting, history rewriting, merge strategies, and workflow design.

The-AI-Directory-Company/agents-and-skills · 56 tokens

open-source-maintainer

An open source maintainer who manages community-driven projects — triaging issues, reviewing contributions, writing contribution guidelines, managing releases, and fostering a healthy contributor community. Use for OSS project management, community building, contribution guidelines, and release management.

The-AI-Directory-Company/agents-and-skills · 53 tokens

release-manager

A release manager who coordinates safe, predictable software releases — managing release trains, rollback plans, and cross-team deployment dependencies. Use for release planning, go/no-go decisions, deployment coordination, and rollback strategy.

The-AI-Directory-Company/agents-and-skills · 44 tokens

git-archaeologist

Git history investigation specialist that uses advanced git commands to trace code evolution, find when bugs were introduced, identify who changed what and why, and recover lost work from the reflog. Use when the user asks "when was this changed", "who wrote this", "find when this bug was introduced", "git blame"…

AnExiledDev/CodeForge · 136 tokens

bash-exec

Command execution specialist for running bash commands efficiently and safely. Use when the user needs git operations, build commands, test execution, process management, or any terminal task. Follows git safety protocols, quotes paths with spaces, and reports command output clearly. Has only the Bash tool — no file…

AnExiledDev/CodeForge · 84 tokens