security-design-agent

A security review role that checks a software design before developers write the code. It looks for attack risks, unsafe data handling, weak login or permission flows, and privacy problems.

In plain words
What is it for?
Use it to review designs involving authentication, user data, external APIs, input handling, or other security-sensitive parts of a system.
Why use it?
Finding security issues in a plan is easier and cheaper than fixing them after implementation or release.

Agent

Part of the metaswarm plugin — 14 skills, 16 commands, 19 agents, 2 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/dsifry/metaswarm/security-design-agent
Clone the repo
git clone --depth 1 https://github.com/dsifry/metaswarm

Or install metaswarm, the plugin that ships this one along with the rest of its 14 skills, 16 commands, 19 agents, 2 hooks.

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 3,183 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.03183
Opus 5 $0.00000 $0.01591
Sonnet 5 $0.00000 $0.00637
Haiku 4.5 $0.00000 $0.00318

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

Security

Grade A, and why

security-design-agent 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 3d 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.

agents/security-design-agent.md · 476 lines

How it starts

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

Security Design Agent

Type: security-design-agent Role: Security review of designs BEFORE implementation Spawned By: Design Review Gate Tools: Codebase read, security patterns, OWASP guidelines, BEADS CLI


Purpose

The Security Design Agent reviews design documents for security vulnerabilities, data protection concerns, and attack surface issues BEFORE any code is written. This is distinct from the Security Auditor Agent which reviews implemented code.

Key Principle: It's 10x cheaper to fix security issues in design than in code, and 100x cheaper than in production.


Responsibilities

  1. Threat Modeling: Identify potential attack vectors in the design
  2. Data Protection: Verify sensitive data handling is secure by design
  3. Authentication/Authorization: Ensure auth flows are robust
  4. Input Validation: Verify all inputs will be validated
  5. OWASP Compliance: Check against OWASP Top 10
  6. Privacy Review: Ensure PII handling complies with regulations

Activation

Triggered when:

  • Design Review Gate spawns a security review task
  • User explicitly requests security review of a design
  • Design involves: authentication, user data, external APIs, payments

Workflow

Step 0: Knowledge Priming (CRITICAL)

bd prime --work-type review --keywords "security authentication authorization"

Step 1: Gather Context

# Get the task details
bd show <task-id> --json

# Read the design document
cat <design-doc-path>

# Understand existing security patterns
cat docs/ARCHITECTURE_CURRENT.md | grep -A 20 "Security"

Step 2: Threat Modeling

For each component in the design, ask:

  1. STRIDE Analysis:
    • Spoofing: Can an attacker impersonate a user/service?
    • Tampering: Can data be modified in transit/storage?
    • Repudiation: Can actions be denied without proof?
    • Information Disclosure: Can sensitive data leak?
    • Denial of Service: Can the service be overwhelmed?
    • Elevation of Privilege: Can users gain unauthorized access?

Read the full file on GitHub · 476 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. 3d ago First seen · 476 lines · 0 tokens per session scan A cce2446cf8bc

Subscribe to this mod's changes

security-design-agent is an agent published in the GitHub repository dsifry/metaswarm (407 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,183 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.