test-driven-development

test-driven-development is a skill for Claude Code, Codex from mtnyilmaz/agents. It costs 44 tokens per session (4,725 once invoked), scanned A, original, MIT.

A development process that writes a test describing the expected behavior before writing the code that implements it. TDD means test-driven development.

In plain words
What is it for?
Use it when adding logic, fixing bugs, or changing behavior: first create a test that fails, then implement the change and verify the test passes.
Why use it?
It provides evidence that a change works and reproduces bugs before they are fixed, instead of relying on code that only seems correct.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; installed under .agents/ (shared by several agents).

Not installable on its own: it runs a file from its repository that does not travel with it. Clone the repository, or install whatever ships that file. The line is go test ./internal/task -run TestCreateTask # Go.

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code, Codex.

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 test-driven-development

README.md
[![agentmods](https://agentmods.dev/badge/skills/mtnyilmaz/agents/methodology-tdd.svg)](https://agentmods.dev/skills/mtnyilmaz/agents/methodology-tdd)
Your own site
<a href="https://agentmods.dev/skills/mtnyilmaz/agents/methodology-tdd"><img src="https://agentmods.dev/badge/skills/mtnyilmaz/agents/methodology-tdd.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,725 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00044 $0.04725
Opus 5 $0.00022 $0.02363
Sonnet 5 $0.00009 $0.00945
Haiku 4.5 $0.00004 $0.00473

Measured 6d ago against content hash 106419f35491, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

test-driven-development 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.

.agents/skills/methodology-tdd/SKILL.md · 473 lines

How it starts

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

Test-Driven Development

Overview

Write a failing test before writing the code that makes it pass. For bug fixes, reproduce the bug with a test before attempting a fix. Tests are proof — "seems right" is not done. A codebase with good tests is an AI agent's superpower; a codebase without tests is a liability.

The Iron Law

╔══════════════════════════════════════════════════════════╗
║  NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST.         ║
║                                                            ║
║  If you didn't watch the test fail, you don't know         ║
║  if it tests the right thing.                              ║
╚══════════════════════════════════════════════════════════╝

No exceptions without explicit user consent. "Just this once" is rationalization — see the table at the end of this document.

Delete Code Written Before Tests

If you wrote implementation code before writing its test — whether from habit, exploration, or a spike — delete it and start over from RED.

  • Don't keep it as "reference."
  • Don't "adapt" it while writing the test.
  • Don't open it in another pane and transcribe.
  • Delete means delete.

Why: a test written against existing code tests what the code already does, not what it should do. You'll miss edge cases you never had to discover, because your implementation already made implicit choices for them. The test will pass on first run, which — per the Iron Law — proves nothing.

Exploration is fine. If you need to try an approach before writing tests, do it on a scratch branch / scratch file, then throw it away and implement fresh from the RED test. Keeping exploration code is the single most common way TDD discipline leaks out of an agent session.

When to Use

  • Implementing any new logic or behavior
  • Fixing any bug (the Prove-It Pattern)
  • Modifying existing functionality
  • Adding edge case handling
  • Any change that could break existing behavior

When NOT to use: Pure configuration changes, documentation updates, or static content changes that have no behavioral impact.

Read the full file on GitHub · 473 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 First seen · 473 lines · 44 tokens per session scan A 106419f35491

Subscribe to this mod's changes

test-driven-development is a skill published in the GitHub repository mtnyilmaz/agents (6 stars, last pushed 3mo ago), licensed MIT. It adds 44 tokens to every session and 4,725 once invoked, about $0.0002 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-31.