tdd-red-writer

tdd-red-writer is an agent for Claude Code, Cursor from tdwhere123/do-it. It costs 28 tokens per session (253 once invoked), scanned A, original, MIT.

A test-first coding helper that writes a small failing test before a behavior change is implemented. TDD means testing the expected behavior before writing the code that makes the test pass.

In plain words
What is it for?
Use it to add focused tests, fixtures, or test-harness changes and run the smallest relevant test command. It stops after establishing the failing test or explaining why that cannot be done.
Why use it?
It creates clear evidence that the requested behavior is missing or incorrect, while keeping the work limited to tests. This helps prevent unclear requirements from turning into unverified code changes.

Agent for Claude CodeCursor

Written for Cursor and Claude Code: shipped in a Cursor plugin, but also a Claude Code subagent (agents/*.md).

Part of the do-it-cursor plugin — 11 skills, 10 agents shipped together

Good fit Use it to add focused tests, fixtures, or test-harness changes and run the smallest relevant test command. It stops after establishing the failing test or explaining why that cannot be done.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/tdwhere123/do-it/tdd-red-writer
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/tdwhere123/do-it

Made for: Claude Code, Cursor.

Or install do-it-cursor, the plugin that ships this one along with the rest of its 11 skills, 10 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-red-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/tdwhere123/do-it/tdd-red-writer/github.svg)](https://agentmods.dev/agents/tdwhere123/do-it/tdd-red-writer)
Your own site
<a href="https://agentmods.dev/agents/tdwhere123/do-it/tdd-red-writer"><img src="https://agentmods.dev/badge/agents/tdwhere123/do-it/tdd-red-writer/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-red-writer

Your own site · 80×15
<a href="https://agentmods.dev/agents/tdwhere123/do-it/tdd-red-writer"><img src="https://agentmods.dev/badge/agents/tdwhere123/do-it/tdd-red-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 253 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.00028 $0.00253
Opus 5.5 $0.00011 $0.00101
Sonnet 5.5 $0.00006 $0.00051
Haiku 4.5 $0.00003 $0.00025

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

Security

Grade A, and why

tdd-red-writer 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.

plugins/do-it-cursor/agents/tdd-red-writer.md · 14 lines

What it actually says

Write the smallest focused test that demonstrates the requested behavior is currently absent or wrong. Work from the behavior contract and the narrowest relevant test area, then run the smallest useful test command.

Edit only tests, fixtures, or test harness files in the assigned scope. Do not edit production code, runtime code, documentation, generated output, global configuration, or unrelated tests. Do not weaken assertions for a convenient failure; preserve deterministic behavior and stop after establishing RED or explaining why it cannot be established.

Return tests changed, command and failure summary, why the result proves the contract, residual risk, and NOT_CHECKED. The parent integrates the result.

Work only the assigned slice. Gather evidence and reach conclusions independently. Treat parent opinions as hypotheses, not authority; preserve the goal, settled decisions, source facts, and authorization boundary. Do not commit, merge, push, tag, publish, revert peer work, or expand the write scope. Return NOT_CHECKED for anything not inspected. The parent owns integration, the task contract, and the completion claim.

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 Changed · -3 lines · -5 tokens per session 3b7be439e404
  2. 1mo ago Changed · +6 lines · +5 tokens per session fb174c68c2bf
  3. 1mo ago First seen · 11 lines · 28 tokens per session scan A fd594e57ca58

Subscribe to this mod's changes

tdd-red-writer is an agent published in the GitHub repository tdwhere123/do-it (28 stars, last pushed 6d ago), licensed MIT. It adds 28 tokens to every session and 253 once invoked, about $0.0001 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.