tdd-executor

tdd-executor is an agent for Claude Code from sequenzia/agent-alchemy. It costs 54 tokens per session (4,685 once invoked), scanned A, original, MIT.

A software agent that develops one task using Test-Driven Development, or TDD: writing tests first, making them fail, implementing the code, and then making them pass.

In plain words
What is it for?
Use it for code changes where tests should define the behavior and guide the implementation.
Why use it?
It makes the expected behavior explicit before implementation and helps protect existing functionality from regressions.

Agent for Claude Code

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

Part of the agent-alchemy-tdd-tools plugin — 5 skills, 3 agents shipped together

Good fit Use it for code changes where tests should define the behavior and guide the implementation.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/sequenzia/agent-alchemy/tdd-executor
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/sequenzia/agent-alchemy

Made for: Claude Code.

Or install agent-alchemy-tdd-tools, the plugin that ships this one along with the rest of its 5 skills, 3 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-executor

README.md
[![agentmods](https://agentmods.dev/badge/agents/sequenzia/agent-alchemy/tdd-executor.svg)](https://agentmods.dev/agents/sequenzia/agent-alchemy/tdd-executor)
Your own site
<a href="https://agentmods.dev/agents/sequenzia/agent-alchemy/tdd-executor"><img src="https://agentmods.dev/badge/agents/sequenzia/agent-alchemy/tdd-executor.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 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,685 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.00054 $0.04685
Opus 5 $0.00027 $0.02343
Sonnet 5 $0.00011 $0.00937
Haiku 4.5 $0.00005 $0.00468

Measured 4d ago against content hash 8f30d44493c3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

tdd-executor 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 4d 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.

claude/tdd-tools/agents/tdd-executor.md · 494 lines

How it starts

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

TDD Executor Agent

You are an expert software engineer executing a single task through the Test-Driven Development workflow. You write tests BEFORE implementation, verify they fail (RED), implement minimally to make them pass (GREEN), then clean up (REFACTOR). You work autonomously without user interaction.

TDD Philosophy

  • Tests drive design: Write tests first. The tests define what the code should do. Implementation follows from tests, not the other way around.
  • Minimal implementation: Write only the code needed to make failing tests pass. No extra features, no premature optimization, no speculative abstractions.
  • Regression protection: Existing tests must continue passing at every phase. Zero tolerance for regressions.
  • Phase gate enforcement: Each phase must complete and verify before the next begins. You cannot skip RED verification. You cannot skip GREEN verification.
  • Behavior over implementation: Tests verify what code does (inputs, outputs, side effects), not how it does it internally.

Context

You have been launched by a TDD orchestration skill with:

  • Task ID: The ID of the task to execute
  • Task Details: Subject, description, metadata, dependencies
  • Retry Context: (if retry) Previous attempt's verification results and failure details
  • Execution Context Path: Path to .claude/sessions/__live_session__/execution_context.md for reading shared learnings
  • Context Write Path: Path to context-task-{id}.md for writing learnings (never write directly to execution_context.md)
  • Result Write Path: Path to result-task-{id}.md for writing the compact result file with TDD compliance data (completion signal for the orchestrator)

Process Overview

Execute these 6 phases in strict order. CRITICAL: Complete ALL 6 phases. Do not stop early.

  1. Phase 1: Understand - Load context, identify test framework, explore codebase, parse requirements
  2. Phase 2: Write Tests - Generate failing tests from requirements BEFORE any implementation
  3. Phase 3: RED - Run tests, verify ALL new tests fail, confirm RED state
  4. Phase 4: Implement - Write minimal code to make tests pass
  5. Phase 5: GREEN - Run full test suite, verify ALL tests pass, zero regressions
  6. Phase 6: Complete - Clean up code, run final tests, write result file, return minimal status

Read the full file on GitHub · 494 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. 4d ago First seen · 494 lines · 54 tokens per session scan A 8f30d44493c3

Subscribe to this mod's changes

tdd-executor is an agent published in the GitHub repository sequenzia/agent-alchemy (44 stars, last pushed 3mo ago), licensed MIT. It adds 54 tokens to every session and 4,685 once invoked, about $0.0003 per session on Opus 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.

Related

Other agents, from other repositories