tdd-test-writer

tdd-test-writer is an agent for Claude Code from kirillgreen/skills. It costs 59 tokens per session (3,520 once invoked), scanned A, original, CC0-1.0.

An agent that writes tests designed to fail before a feature is implemented. TDD, or test-driven development, starts with these failing tests and uses them to define the required behavior.

In plain words
What is it for?
Use it to create behavior-focused tests from acceptance criteria, edge cases, error cases, project documentation, or a feature description.
Why use it?
It turns feature requirements and specifications into concrete checks before coding begins. It also rejects tests that make weak claims, depend on private implementation names, or rely too heavily on mocks.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; mentions CLAUDE.md; mentions AGENTS.md.

Good fit Use it to create behavior-focused tests from acceptance criteria, edge cases, error cases, project documentation, or a feature description.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/kirillgreen/skills/tdd-test-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/kirillgreen/skills

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-test-writer

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/kirillgreen/skills/tdd-test-writer"><img src="https://agentmods.dev/badge/agents/kirillgreen/skills/tdd-test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,520 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.00059 $0.03520
Opus 5 $0.00030 $0.01760
Sonnet 5 $0.00012 $0.00704
Haiku 4.5 $0.00006 $0.00352

Measured 9d ago against content hash 33dd5db16134, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

tdd-test-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 9d 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.

tdd/agents/tdd-test-writer.md · 303 lines

How it starts

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

TDD Test Writer Agent (RED Phase)

Write failing tests that verify spec-defined behavior. Tests MUST fail before returning.

This agent enforces the orchestrator's Post-RED Lint patterns at source — the assertion-quality rules below are hard DO-NOTs, not post-hoc warnings.

Context Loading

When working on a specific project, look for project-level guidance and load it if present — a CLAUDE.md, AGENTS.md, or *_META.md file in the project root or immediate subfolders, a root README.md, or an index file in docs/. These often hold a Doc Routing table, testing conventions, or links to specs. Determine the project from file paths in the task. Skip if the project is unclear or the task is framework-agnostic.

Agent Spec

Input

type: object
properties:
  feature_requirement:
    type: string
    description: What the feature should do (from user prompt)
  locked_spec:
    type: string
    description: >
      Structured spec with numbered acceptance criteria (AC-1, AC-2, ...),
      edge cases (EC-1, ...), and error cases (ERR-1, ...).
      Each criterion must have at least one corresponding test.
      If empty — tests are generated from prompt only (less reliable).
  project_path:
    type: string
    description: Absolute path to the project root
  test_framework:
    type: string
    enum: [vitest, swift-testing, xctest, bun]
  test_run_command:
    type: string
    description: Command to run tests (e.g., "npx vitest run {file}")
  test_level_hint:
    type: string
    required: false
    description: >
      Optional hint from orchestrator about test level.
      "integration" — use Supertest/MSW, test at API boundary.
      "e2e" — use Playwright if available.
      If absent — default to unit tests.
required: [feature_requirement, project_path, test_framework, test_run_command]

Output

type: object
properties:
  test_file_path:
    type: string
    description: Absolute path to the created test file
  failure_output:
    type: string
    description: Test runner output proving tests fail
  summary:
    type: string
    description: What each test verifies, mapped to spec criteria
  spec_traceability:
    type: string
    description: "spec-based" or "prompt-only"
  criteria_coverage:
    type: object
    description: >
      Map of spec criteria to test names. Example:
      { "AC-1": "formats bytes to human-readable string",
        "AC-2": "uses binary units (1024-based)",
        "EC-1": "handles zero bytes",
        "ERR-1": "throws on negative input" }
      Empty object if prompt-only mode.
  status:
    enum: [complete, error]
required: [test_file_path, failure_output, summary, criteria_coverage, status]

Read the full file on GitHub · 303 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. 9d ago First seen · 303 lines · 59 tokens per session scan A 33dd5db16134

Subscribe to this mod's changes

tdd-test-writer is an agent published in the GitHub repository kirillgreen/skills (21 stars, last pushed 6d ago), licensed CC0-1.0. It adds 59 tokens to every session and 3,520 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-08-30.