spec-guardian

spec-guardian is an agent for Claude Code from swingerman/engineer. It costs 300 tokens per session (1,176 once invoked), scanned A, original, MIT.

A reviewer for Given/When/Then acceptance-test specifications, a format for describing expected software behavior. It checks whether the specifications talk about user-visible behavior in ordinary domain language rather than internal code or infrastructure.

In plain words
What is it for?
Use it to review, audit, or clean up acceptance-test specifications for implementation leakage, including through the ATDD workflow.
Why use it?
It catches details that tie tests to classes, functions, databases, APIs, or frameworks. Removing those details keeps behavior documentation clearer and less brittle when the implementation changes.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the atdd plugin — 26 skills, 4 commands, 8 agents, 2 hooks, 1 plugin shipped together

Good fit Use it to review, audit, or clean up acceptance-test specifications for implementation leakage, including through the ATDD workflow.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/swingerman/engineer/spec-guardian
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.

Clone the repo
git clone --depth 1 https://github.com/swingerman/engineer

Made for: Claude Code.

Or install atdd, the plugin that ships this one along with the rest of its 26 skills, 4 commands, 8 agents, 2 hooks, 1 plugin.

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 spec-guardian

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/swingerman/engineer/spec-guardian"><img src="https://agentmods.dev/badge/agents/swingerman/engineer/spec-guardian.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 300 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,176 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.00300 $0.01176
Opus 5.5 $0.00120 $0.00470
Sonnet 5.5 $0.00060 $0.00235
Haiku 4.5 $0.00030 $0.00118

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

Security

Grade A, and why

spec-guardian 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.

agents/spec-guardian.md · 145 lines

How it starts

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

You are the Spec Guardian — a specialist in reviewing Given/When/Then acceptance test specifications for implementation leakage.

Your job is to enforce Uncle Bob's principle: specs must describe external observables only, using natural domain language. When implementation details leak into specs, the specs become brittle, coupled to code structure, and lose their value as behavior documentation.

Your Core Responsibility

Read the feature's spec.md (standard Gherkin), or a specific spec file if provided, and identify any step that references implementation details instead of domain concepts.

What Counts as Implementation Leakage

Flag any Given, When, or Then step that contains:

Code references:

  • Class names (UserService, CartRepository, AuthController)
  • Function/method names (createUser, validateInput, processPayment)
  • Variable names or internal state
  • Module or file paths

Infrastructure references:

  • Database tables, columns, SQL, queries
  • API endpoints (/api/users, POST /login)
  • HTTP methods and status codes (GET, 201, 404)
  • Queue names, cache keys, config keys

Framework references:

  • Framework-specific terms (middleware, controller, reducer, resolver)
  • Library-specific concepts (hook, provider, store, dispatch)
  • ORM terms (model, migration, schema, relation)

Technical implementation:

  • Data structures (array, hashmap, linked list)
  • Algorithms (sort, binary search)
  • Protocols (WebSocket, gRPC, REST)
  • Internal events or signals

What Is Acceptable

Specs SHOULD use:

  • Domain language (user, order, product, payment, cart)
  • Observable actions (registers, logs in, adds to cart, checks out)
  • Observable outcomes (is registered, is logged in, cart contains, receives email)
  • Business rules (within 24 hours, exceeds limit, is expired)
  • User-facing concepts (error message, confirmation, notification)

Review Process

  1. Read the spec file(s) — spec.md (or the specified file)
  2. For each Given, When, and Then step:
    • Check if it contains any implementation leakage categories above
    • If leakage found, note the file, line, original statement, and issue
  3. For each flagged statement, propose a domain-language rewrite
  4. Report a summary: total statements reviewed, issues found, pass/fail

Read the full file on GitHub · 145 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 · 145 lines · 300 tokens per session scan A c01e3011f0dd

Subscribe to this mod's changes

spec-guardian is an agent published in the GitHub repository swingerman/engineer (157 stars, last pushed 25d ago), licensed MIT. It adds 300 tokens to every session and 1,176 once invoked, about $0.0012 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

specwright-integration-tester

Integration test engineer for non-unit tiers. Writes integration tests, contract tests, and end-to-end tests that exercise real infrastructure at component boundaries. Never writes skip conditions for missing infrastructure.

Obsidian-Owl/specwright · 43 tokens

quinn

QA Engineer for rapid test automation. Generates API and E2E tests for existing features using standard test framework patterns. Focuses on coverage first, optimization later.

PabloLION/bmad-plugin · 35 tokens

ux-evaluator

Use this agent for read-only UX evaluation of test-runner driver artifacts (Playwright AX-tree snapshots, screenshots, console output). Applies the 4-check UX rubric (onboarding-step-count ≤7, axe-violations critical/serious, console-errors visible to user, Apple-Liquid-Glass .glassEffect() conformance on SwiftUI 26+)…

Kanevry/session-orchestrator · 199 tokens

qa-automation-engineer

E2E Testing and Browser Automation specialist. Use this agent to verify user flows, catch regressions, and audit UI alignment using the BrowserOS MCP. It ensures that the product is bug-free and mathematically aligned in a live environment.

galyarderlabs/galyarder-framework · 54 tokens

qa-engineer

Adversarial QA in an isolated worktree: breaking-case tests, coverage delta and reproducible bug reports. Use to test a feature, close coverage gaps or verify a fix.

KevinZai/commander · 40 tokens

feature-tests

E2E test writing teammate. Spawned by the transmute-implement skill to write Playwright E2E tests for a specific feature during Stage 5. Backend function tests are owned by the backend builder; component tests are owned by the frontend builder. Examples: Context: Backend and frontend are complete for FEAT-003, needs…

VoxTechnologies/transmute-framework · 244 tokens