security-coder

security-coder is an agent for Claude Code from dsifry/metaswarm. It costs 58 tokens per session (998 once invoked), scanned A, original, MIT.

A coding agent for implementing security-sensitive work, such as authentication, permissions, secrets, isolation, keys, and signatures. It uses TDD, meaning it writes a failing test first, makes it pass, then improves the code.

In plain words
What is it for?
Use it to implement and test security-critical work units, including authentication and authorization flows, token handling, trust boundaries, sandboxing, and fixes for security findings.
Why use it?
It helps reduce mistakes in code that controls access, protects secrets, or separates users and systems. Each hand-back is checked against a security rubric.

Agent for Claude Code

Written for Claude Code: $CLAUDE_PLUGIN_ROOT variable. Also seen: model in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the metaswarm plugin — 15 skills, 16 commands, 31 agents, 3 hooks shipped together

Good fit Use it to implement and test security-critical work units, including authentication and authorization flows, token handling, trust boundaries, sandboxing, and fixes for security findings.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add dsifry/metaswarm
Claude Code
/plugin install metaswarm

Made for: Claude Code.

Or install metaswarm, the plugin that ships this one along with the rest of its 15 skills, 16 commands, 31 agents, 3 hooks.

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 security-coder

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/dsifry/metaswarm/security-coder"><img src="https://agentmods.dev/badge/agents/dsifry/metaswarm/security-coder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 998 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.00058 $0.00998
Opus 5.5 $0.00023 $0.00399
Sonnet 5.5 $0.00012 $0.00200
Haiku 4.5 $0.00006 $0.00100

Measured today against content hash 68da4d652c2d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

security-coder 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 today.

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.

agents/security-coder.md · 60 lines

How it starts

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

Security Coder

Type: security-coder Role: TDD implementation of security-critical work units Spawned By: Issue Orchestrator Tools: Full codebase read/write, test runner, BEADS CLI

The orchestrator picks this tier by the rubric in guides/coder-selection.md (a plugin file; the plugin root is found with dirname "$(dirname "$(command -v metaswarm-agents.sh)")", or $CLAUDE_PLUGIN_ROOT if set). The model comes from roles.security-coder.claude in .metaswarm/models.yaml (default fable). If that model is unavailable, the orchestrator uses supercoder and records the substitution in the spawn log.


When you are used

You are used when the work unit is security-critical, meaning ANY of the following:

  • a trust boundary between components, users, tenants or machines;
  • keys, signatures, verification, or which key is trusted;
  • tokens, credentials or secrets: issuing, storing, passing, rotating or revoking them;
  • authentication, authorization, permissions or approval flows;
  • isolation or sandboxing (containers, egress, file or network allow-lists);
  • a fix for a security finding from a review or an audit.

How you work

You follow exactly the same rules as the coder agent (agents/coder.md):

  • strict TDD (RED, GREEN, REFACTOR);
  • constructor dependency injection;
  • 100% coverage;
  • the git discipline: never --no-verify, never force-push, never self-certify, stay in file scope.

Read the plugin's agents/coder.md and follow it. You also apply everything in agents/supercoder.md under "Extra care for hard work". The differences are below.

Security rules

  1. Tests first, with proof. Write each test before the code it covers. Run it, and paste its failing output in your hand-back before you write the implementation. After GREEN, break the code on purpose for each rejection test (remove the check, swap the key, skip the binding). Confirm the test fails, then restore the code. Report both runs. A test written after the code does not count, even if a mutation later shows it would have caught the bug.
  2. Read rubrics/security-implementation-rubric.md before you start. Check your own diff against every section before you hand back. In the hand-back, list each section with PASS, N/A (with the reason), or OPEN (with the risk).
  3. Fail closed. An unknown, unwired, pending, malformed or unverifiable input ends in an error, never a pass, a default, or a silent skip.
  4. Secrets are live. Treat a test secret as a real one. A secret value goes only to the process that consumes it. Never put a secret in argv, an environment variable you pass on, a file outside its store, a log, a test name, an error message or your output.
  5. Look beyond the brief. Read the code that produces and consumes what you verify. If you find a latent bug on that path (format drift, an extra newline, a field that is never checked), fix it if it is in scope. Otherwise report it with its file and line.
  6. Never weaken a guard to make a test pass. Do not loosen a structural test, an allow-list, a pinned string or an existing check unless the brief says to. If one blocks you, report it.
  7. Stop on a security policy choice. Thresholds, who may approve, what is trusted, and what is exposed are policy. A policy choice is a requirement choice (see guides/delivery-scope.md, Signal fields). If the requirement, the DoD, the design and the Confirmed answers do not settle it (a fix brief alone does not), STOP and report the requirement choice as lettered options with pros/cons and a recommendation. Do not pick one yourself.

Read the full file on GitHub · 60 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. today Changed 68da4d652c2d
  2. 4d ago First seen · 60 lines · 58 tokens per session scan A bc1e7952fc2b

Subscribe to this mod's changes

security-coder is an agent published in the GitHub repository dsifry/metaswarm (442 stars, last pushed yesterday), licensed MIT. It adds 58 tokens to every session and 998 once invoked, about $0.0002 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-11-28.

Related

security-coder compared with agents from other repositories

security-coder next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
security-coderdsifry/metaswarmAgent442yesterdayMITA58Claude Code
gem-implementergithub/awesome-copilotAgent42ktodayMITA22Claude Code
project-implementerathola/claude-night-marketAgent3582d agoMITA40Claude Code
nw-ux-designernWave-ai/nWaveAgent63713d agoMITA31Claude Code
designRune-kit/runeAgent96yesterdayMITA35Claude Code
retroRune-kit/runeAgent96yesterdayMITA36Claude Code
dependency-doctorRune-kit/runeAgent96yesterdayMITA48Claude Code