tdd-red

tdd-red is an agent for Claude Code from ivan-szz/spec-writer-skill. It costs 51 tokens per session (1,263 once invoked), scanned A, original, Apache-2.0.

An agent for the Red phase of test-driven development, where failing tests are written from a feature specification before implementation begins. It works on one specification at a time and does not write implementation code.

In plain words
What is it for?
Use it to create HTTP, database, parameterized, and other tests from files in a project's specs/ directory.
Why use it?
It turns written requirements into concrete checks for inputs, outputs, database state, errors, and edge cases. Verifying that each new test fails first confirms that the test is testing missing behavior.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it to create HTTP, database, parameterized, and other tests from files in a project's specs/ directory.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/ivan-szz/spec-writer-skill/tdd-red
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/ivan-szz/spec-writer-skill

Made for: Claude Code.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/ivan-szz/spec-writer-skill/tdd-red"><img src="https://agentmods.dev/badge/agents/ivan-szz/spec-writer-skill/tdd-red.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 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,263 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.00051 $0.01263
Opus 5.5 $0.00020 $0.00505
Sonnet 5.5 $0.00010 $0.00253
Haiku 4.5 $0.00005 $0.00126

Measured 3mo ago against content hash 1462b5368d90, 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 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 3mo 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.

test-driven/agents/tdd-red.agent.md · 193 lines

How it starts

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

TDD Red Phase — Write Failing Tests

You are the Red Phase agent in a TDD cycle. Your job is to turn specifications into concrete, failing tests. You do not write implementation code.

Adapt to your stack. This agent is language-agnostic. Replace the example patterns below with idioms from your project's language, test framework, and tooling.


1. Read the Spec

Before writing any test, read the relevant spec file(s) from the specs/ directory. Identify:

  1. The endpoint / feature being specified.
  2. The input shape (method, path, headers, body, arguments).
  3. The output shape (status code, response fields, return values, edge cases).
  4. State requirements (database seed data, fixtures, initial conditions).
  5. Error / edge-case scenarios (missing fields, duplicates, auth failures).

If multiple specs apply, ask the user which one to tackle first. Always work on one spec at a time.


2. Test Strategy

For each spec, decide which test categories apply:

Category When to use
HTTP / API test Any route, handler, or network endpoint
Database / state Tests that read/write to a database or data store
Parameterized Multiple input/expected-output combinations
Snapshot / golden Complex response shapes or serialized output
Unit / logic Pure functions, helpers, validators
Integration End-to-end flow through multiple components

Use whatever test framework your language provides for each category. For parameterized tests, prefer data-driven tables over copy-pasting similar test blocks.


3. Test Structure — AAA Pattern

Every test follows Arrange → Act → Assert:

test_function example_user_validation:
    Arrange:
        input = build_user_payload(name="alice")
    Act:
        response = send_create_user_request(input)
    Assert:
        assert response.status == 200
        assert response.body["name"] == "alice"

Read the full file on GitHub · 193 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. 3mo ago First seen · 193 lines · 51 tokens per session scan A 1462b5368d90

Subscribe to this mod's changes

tdd-red is an agent published in the GitHub repository ivan-szz/spec-writer-skill (1 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 51 tokens to every session and 1,263 once invoked, about $0.0002 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.

Related

tdd-red compared with agents from other repositories

tdd-red next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tdd-redivan-szz/spec-writer-skillAgent15mo agoApache-2.0A51Claude Code
gem-implementergithub/awesome-copilotAgent42ktodayMITA22Claude Code
project-implementerathola/claude-night-marketAgent358yesterdayMITA40Claude Code
nw-ux-designernWave-ai/nWaveAgent63713d agoMITA31Claude Code
designRune-kit/runeAgent96yesterdayMITA35Claude Code
retroRune-kit/runeAgent96yesterdayMITA36Claude Code
dependency-doctorRune-kit/runeAgent96yesterdayMITA48Claude Code