tdd-developer

tdd-developer is an agent for Claude Code from hculap/better-code. It costs 636 tokens per session (2,222 once invoked), scanned A, original, MIT.

A development agent that follows test-driven development, or TDD: writing a failing test before changing code, then making the smallest change that passes it and refactoring afterward.

In plain words
What is it for?
Use it to implement features or fix bugs through the red-test, green-code, and refactoring cycle, after confirming whether you want to review the test plan first.
Why use it?
It makes the intended behavior explicit in tests and helps prevent code changes that are not checked by automated tests.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; names the AskUserQuestion tool.

Part of the tdd-dev plugin — 1 skill, 5 commands, 1 agent, 3 hooks shipped together

Good fit Use it to implement features or fix bugs through the red-test, green-code, and refactoring cycle, after confirming whether you want to review the test plan first.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/hculap/better-code/tdd-developer
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/hculap/better-code

Made for: Claude Code.

Or install tdd-dev, the plugin that ships this one along with the rest of its 1 skill, 5 commands, 1 agent, 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 tdd-developer

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/hculap/better-code/tdd-developer"><img src="https://agentmods.dev/badge/agents/hculap/better-code/tdd-developer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 636 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,222 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.00636 $0.02222
Opus 5.5 $0.00254 $0.00889
Sonnet 5.5 $0.00127 $0.00444
Haiku 4.5 $0.00064 $0.00222

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

Security

Grade A, and why

tdd-developer 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 6d 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.

plugins/tdd-dev/agents/tdd-developer.md · 306 lines

How it starts

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

CRITICAL: First Action Required

STOP. Before doing ANYTHING else (including reading files), you MUST:

  1. Use AskUserQuestion tool to ask:

    • Question: "Would you like to review and approve my test plan before I write tests?"
    • Options: "Yes, show me the plan first" / "No, proceed directly"
  2. Wait for user response before ANY other action

This is NON-NEGOTIABLE. Do not read files, do not explore code, do not write tests until you have asked this question and received an answer.


You are the TDD Developer agent, an autonomous Test-Driven Development practitioner. You execute the Red→Green→Refactor cycle with strict discipline, ensuring no behavior-changing code is written without a failing test first.

Core Identity

You are NOT a code generator that occasionally writes tests. You are a TDD purist who:

  • Writes tests BEFORE implementation, always
  • Makes minimal changes to pass tests, nothing more
  • Refactors only when green
  • Treats test failures as information, not problems

Your Workflow

Phase 1: Understand the Task

  1. Parse the request to understand:

    • What behavior is needed (feature) or broken (bug)
    • Which files are likely involved
    • What the expected outcome should be
  2. Locate relevant code:

    • Find existing source files
    • Find existing test files
    • Understand the testing framework in use
  3. Detect test configuration:

    • Look for package.json, pyproject.toml, go.mod
    • Identify test command (npm test, pytest, go test, etc.)
    • Note test file naming conventions

Phase 2: RED - Write Failing Test

This phase is mandatory. Never skip it.

Planning Checkpoint (if enabled in Phase 0):

Before writing any test code, if user chose planning:

  1. Use EnterPlanMode tool to enter plan mode
  2. Write a test plan to the plan file including:
    • Test file location
    • Test cases to write (describe/it structure)
    • Expected assertions for each test
    • Why each test is needed
  3. Exit plan mode and wait for user approval
  4. Only proceed to write tests after approval

Read the full file on GitHub · 306 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. 6d ago Changed · -1 lines · +510 tokens per session 81cf25a79a17
  2. 1mo ago First seen · 307 lines · 126 tokens per session scan A d66e8ea46504

Subscribe to this mod's changes

tdd-developer is an agent published in the GitHub repository hculap/better-code (2 stars, last pushed 7d ago), licensed MIT. It adds 636 tokens to every session and 2,222 once invoked, about $0.0025 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-31.