test-driven-development

test-driven-development is a skill for Claude Code from andreymudri/claude-teammates. It costs 32 tokens per session (783 once invoked), scanned A, original, MIT.

A development method called test-driven development, or TDD, in which you write a test before the code that should make it pass. The cycle is to write a failing test, add the smallest fix, check the full test suite, and then clean up the code.

In plain words
What is it for?
Use it when building a feature or fixing a bug to guide implementation one behavior at a time and check that existing behavior still works.
Why use it?
It catches incorrect assumptions early and helps show that a test fails for the intended reason before implementation begins.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-teammates plugin — 14 skills, 3 agents, 2 hooks shipped together

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.

agentmods
npx agentmods add skills/andreymudri/claude-teammates/test-driven-development
Any agent
npx skills add andreymudri/claude-teammates --skill test-driven-development
Clone the repo
git clone --depth 1 https://github.com/andreymudri/claude-teammates

Made for: Claude Code.

Or install claude-teammates, the plugin that ships this one along with the rest of its 14 skills, 3 agents, 2 hooks.

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/andreymudri/claude-teammates/test-driven-development.svg)](https://agentmods.dev/skills/andreymudri/claude-teammates/test-driven-development)
Your own site
<a href="https://agentmods.dev/skills/andreymudri/claude-teammates/test-driven-development"><img src="https://agentmods.dev/badge/skills/andreymudri/claude-teammates/test-driven-development.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 783 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.00032 $0.00783
Opus 5 $0.00016 $0.00392
Sonnet 5 $0.00006 $0.00157
Haiku 4.5 $0.00003 $0.00078

Measured 5d ago against content hash 1395f5b79535, 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 5d 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.

skills/test-driven-development/SKILL.md · 71 lines

How it starts

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

Test-Driven Development (TDD)

Adapted from the MIT-licensed superpowers plugin by Jesse Vincent. See NOTICE.md.

Overview

Write the test first. Watch it fail. Write minimal code to pass.

Core principle: if you didn't watch the test fail, you don't know if it tests the right thing.

The Cycle

One action per step. Do not merge steps or skip ahead.

  1. RED — write one failing test for one behavior.
  2. Verify RED — run it. Confirm it fails, and check why it fails.
  3. GREEN — write the minimal code to pass that test.
  4. Verify GREEN — run the full suite. Confirm it passes and nothing else broke.
  5. REFACTOR — clean up duplication and naming while staying green.
  6. COMMIT — commit the change, then start the next RED.

Verify RED means checking the failure message, not just the exit code

A red exit code alone proves nothing. Read the failure message before moving on:

  • Correct reason: the assertion fails because the behavior doesn't exist yet — e.g. AssertionError: expected undefined to equal 'success'.
  • Wrong reason: a typo in the import path, a missing file, a syntax error, a test that throws before it reaches the assertion. These also turn the run red, but they say nothing about the code under test — a fix that turns this red green afterward proves nothing either, because the test was never exercising the real behavior.

If the failure isn't the expected one, fix the test (or the setup) and rerun until the failure is the one you intended, before writing any implementation code.

GREEN: minimal code only

Write just enough to pass the test that's currently red. Don't add options, branches, or handling for cases no test asks for yet. Extra behavior written now is behavior no test has watched fail — it's exactly the kind of code this discipline exists to prevent.

Red Flags

Any of these thoughts, mid-task, means stop and go back to RED:

Rationalization Reality
"This is too obvious to test" Obvious code is exactly the code that breaks silently. Writing the test takes seconds; it's the only proof the obvious thing is actually true.
"I'll write tests after" A test written after the code it verifies always passes on the first run. A test that has never failed has never proven it can catch a bug — you've written documentation, not a test.
"The test is trivial" Trivial to write is not the same as unnecessary. If the assertion is trivial, writing it first costs nothing; skipping it saves nothing either.

Read the full file on GitHub · 71 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. 5d ago First seen · 71 lines · 32 tokens per session scan A 1395f5b79535

Subscribe to this mod's changes

test-driven-development is a skill published in the GitHub repository andreymudri/claude-teammates (2 stars, last pushed 4d ago), licensed MIT. It adds 32 tokens to every session and 783 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.

Related

Other skills, from other repositories