tdd

tdd is a skill for Claude Code from t1/tdder. It costs 102 tokens per session (1,411 once invoked), scanned A, original, Apache-2.0.

A test-first software development workflow. TDD, or test-driven development, means writing a failing test, making it pass with the smallest change, and then improving the code.

In plain words
What is it for?
Use it when adding a feature or fixing a bug with a red-green-refactor cycle, pending test lists, one test at a time, and human approval of the planned tests.
Why use it?
It keeps feature work and bug fixes tied to explicit tests and limits implementation to one verified behavior at a time.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: names the AskUserQuestion tool.

Part of the tdder plugin — 14 skills, 2 commands, 6 agents, 1 hook shipped together

Good fit Use it when adding a feature or fixing a bug with a red-green-refactor cycle, pending test lists, one test at a time, and human approval of the planned tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/t1/tdder/tdd
View source ↗ t1/tdder
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.

Any agent
npx skills add t1/tdder --skill tdd
Clone the repo
git clone --depth 1 https://github.com/t1/tdder

Made for: Claude Code.

Or install tdder, the plugin that ships this one along with the rest of its 14 skills, 2 commands, 6 agents, 1 hook.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/t1/tdder/tdd"><img src="https://agentmods.dev/badge/skills/t1/tdder/tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,411 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.00102 $0.01411
Opus 5.5 $0.00041 $0.00564
Sonnet 5.5 $0.00020 $0.00282
Haiku 4.5 $0.00010 $0.00141

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

Security

Grade A, and why

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

skills/tdd/SKILL.md · 171 lines

How it starts

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

Test-Driven Development (TDD)

Strict Red-Green-Refactor discipline for adding features and fixing bugs. This skill is language-agnostic; language-specific conventions are provided by separate skills.

Core Process

1. Test List First

Create a list of test cases for base functionality only before writing any implementation. Use the language's equivalent of pending/todo tests (e.g., it.todo(), @Disabled, @Ignore). Focus on core functionality, not advanced features.

2. Test List Approval

After creating the test list, present it as markdown. Then, if the human-in-the-loop is not off, use AskUserQuestion:

  • Question: "Want to adjust the test list before we start?"
  • Options:
    • "Looks good, start" — proceed with the first test
    • "Add more tests" — wait for the user to specify additional tests

3. One Test at a Time

Convert exactly one pending test to executable test code at a time. All other tests remain as pending descriptions. Never have more than one failing test in the red phase. Implement only what is needed to make that single test pass. Do not think ahead or implement features for future tests.

4. Red-Green-Refactor Cycle

Red Phase (Compilation Error)
  1. Write the test referencing a non-existent function/class.
  2. Predict: "This will fail with a compilation error on <symbol>."
  3. Run — confirm compilation error, compare with prediction.
Red Phase (Runtime Error)
  1. Create an empty function/class returning a wrong value.
  2. Predict: "This will fail with an assertion error — expected <X>, got <Y>."
  3. Run — confirm assertion error, compare with prediction.
Green Phase
  1. Predict: "This will pass after I implement <X>."
  2. Implement minimal code to make the test pass. Do not add features for future tests. Do not optimize or refactor yet.
  3. Run — confirm green, compare with prediction.
Refactor Phase

Must attempt at least one refactoring. If no improvement is possible, document why.

Read the full file on GitHub · 171 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. 1mo ago First seen · 171 lines · 102 tokens per session scan A 7538bba89068

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository t1/tdder (14 stars, last pushed yesterday), licensed Apache-2.0. It adds 102 tokens to every session and 1,411 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

diagnose

A structured troubleshooting workflow for complex software bugs. TDD here means test-driven development; this skill defines the diagnosis phase, including gathering bug details, forming several possible causes, and checking them.

morodomi/dev-crew · 42 tokens

testing-principles

Language-agnostic testing principles for choosing which tests a change needs, test quality, and proof ownership, with frontend and browser E2E implementation references. Use when writing tests, deciding test scope, or reviewing test quality.

shinpr/claude-code-workflows · 50 tokens

validate-fix

Prove a fix works before declaring done — re-run the failing test, run the full suite, typecheck, lint, and harden against recurrence. Use after implementing a bug fix, when user says "is this fixed?", or before closing an investigation.

danielvm-git/bigpowers · 56 tokens

pair-programming

AI-assisted pair programming with multiple modes (driver/navigator/switch), real-time verification, quality monitoring, and comprehensive testing. Supports TDD, debugging, refactoring, and learning sessions. Features automatic role switching, continuous code review, security scanning, and performance optimization with…

frankxai/claude-skills-library · 85 tokens

investigate-bug

Investigate a bug or issue by exploring the codebase to find root cause, then write a TDD-based fix plan to specs/bugs/BUG-.md. Use when user reports a bug, wants to investigate a problem, mentions "triage", or wants to plan a fix.

danielvm-git/bigpowers · 64 tokens

implement

For a build brief, implementing a spec or tracked item, or mid-build discoveries tempting scope expansion, build thin verified slices with test-first checks at named boundaries, proportional validation elsewhere, and respect for scope and commit instructions.

timharris707/skills · 46 tokens