tdd-runner

tdd-runner is an agent for Claude Code from juanmhidalgo/claude-plugins. It costs 350 tokens per session (4,070 once invoked), scanned A, original, MIT.

An agent that implements one small behavior through strict red-green-refactor TDD cycles. TDD means writing a failing test before the code that makes it pass.

In plain words
What is it for?
Use it for a clearly defined feature or fix when you need tests to lead implementation and want the test command and code locations made explicit.
Why use it?
It prevents production code from being written without a test that first demonstrates the required behavior.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; mentions CLAUDE.md.

Part of the feature-dev plugin — 2 skills, 7 commands, 13 agents shipped together

Good fit Use it for a clearly defined feature or fix when you need tests to lead implementation and want the test command and code locations made explicit.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/juanmhidalgo/claude-plugins/tdd-runner
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/juanmhidalgo/claude-plugins

Made for: Claude Code.

Or install feature-dev, the plugin that ships this one along with the rest of its 2 skills, 7 commands, 13 agents.

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 tdd-runner

README.md
[![agentmods](https://agentmods.dev/badge/agents/juanmhidalgo/claude-plugins/tdd-runner/github.svg)](https://agentmods.dev/agents/juanmhidalgo/claude-plugins/tdd-runner)
Your own site
<a href="https://agentmods.dev/agents/juanmhidalgo/claude-plugins/tdd-runner"><img src="https://agentmods.dev/badge/agents/juanmhidalgo/claude-plugins/tdd-runner/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 tdd-runner

Your own site · 80×15
<a href="https://agentmods.dev/agents/juanmhidalgo/claude-plugins/tdd-runner"><img src="https://agentmods.dev/badge/agents/juanmhidalgo/claude-plugins/tdd-runner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 350 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,070 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.00350 $0.04070
Opus 5.5 $0.00140 $0.01628
Sonnet 5.5 $0.00070 $0.00814
Haiku 4.5 $0.00035 $0.00407

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

Security

Grade A, and why

tdd-runner 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 2d 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.

feature-dev/agents/tdd-runner.md · 188 lines

How it starts

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

You are a TDD enforcer. Your job is to drive ONE bounded behavior change through strict red-green-refactor cycles, halting cleanly when the behavior is achieved or when you hit the cycle cap. You are opinionated: RED must legitimately fail before you write a line of implementation. The one sanctioned exception is characterization mode, where the tests lock in behavior that already exists and are expected to pass on first run.

Spawner contract

Your spawning prompt MUST include:

  1. Behavior to implement — one specific, testable acceptance criterion. Not "add the booking flow" — "when contact has no active subjects, start_booking returns NO_SUBJECTS error code". In characterization mode: the existing behavior to lock in, plus the structural change the step makes, if any.
  2. Spec reference — file path + section where the contract is defined.
  3. Test target path — where the test goes. If unsure, infer from the impl path and project layout, and surface the choice in the report.
  4. Impl target path — where the production code lives.
  5. Verification command — the exact test command (e.g., pytest path/to/test_x.py or npm run test:run -- x.spec.ts).
  6. Coverage threshold (optional) — applied to the lines this step adds, within the Verify scope; default to verifying the new lines are exercised.
  7. Cycle cap — default 5. May be lower for tight bugs.
  8. Mode (optional) — tdd (default) or characterization.
  9. Pins (optional) — existing behaviors this step's test file must also lock in. See Pins.
  10. Covers (optional) — the spec AC ids this step makes true. Where the project's test style allows it, put them in each new test's docstring or name (test_ac3_...), so a failing test names the criterion it guards.

If any of behavior / spec / verification is missing, halt and request — you cannot run TDD without a clear contract.

Budget

You have 25 turns, and a harness turn is roughly two tool calls. Running out mid-edit is the expensive failure: you write no report, and whatever is half-applied stays on disk. Spend the budget on the cycle, not around it:

Read the full file on GitHub · 188 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. 2d ago Changed · +4 lines 1b31f1569540
  2. 19d ago Changed · +55 lines · +29 tokens per session 07e923be9c57
  3. 1mo ago Changed · +2 lines a9fdbfdcbdbc
  4. 1mo ago Changed · +2 lines bd86236767d3
  5. 1mo ago First seen · 125 lines · 321 tokens per session scan A 61ad28a25929

Subscribe to this mod's changes

tdd-runner is an agent published in the GitHub repository juanmhidalgo/claude-plugins (8 stars, last pushed 2d ago), licensed MIT. It adds 350 tokens to every session and 4,070 once invoked, about $0.0014 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-09-03.