tdd

tdd is a skill for Claude Code, Codex from youdotcom-oss/dx-toolkit. It costs 63 tokens per session (652 once invoked), scanned A, a copy of tdd, MIT.

A test-first development guide in which you write a failing test, make it pass with the smallest change, then clean up the code.

In plain words
What is it for?
Use it when adding features or fixing behavior, including command-line tools, integrations, error paths, and public interfaces.
Why use it?
It helps catch behavior changes early and keeps tests focused on what users and other programs can observe.

Skill for Claude CodeCodex

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

Good fit Use it when adding features or fixing behavior, including command-line tools, integrations, error paths, and public interfaces.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/youdotcom-oss/dx-toolkit/tdd
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 youdotcom-oss/dx-toolkit --skill tdd
Clone the repo
git clone --depth 1 https://github.com/youdotcom-oss/dx-toolkit

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 tdd

README.md
[![agentmods](https://agentmods.dev/badge/skills/youdotcom-oss/dx-toolkit/tdd/github.svg)](https://agentmods.dev/skills/youdotcom-oss/dx-toolkit/tdd)
Your own site
<a href="https://agentmods.dev/skills/youdotcom-oss/dx-toolkit/tdd"><img src="https://agentmods.dev/badge/skills/youdotcom-oss/dx-toolkit/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/youdotcom-oss/dx-toolkit/tdd"><img src="https://agentmods.dev/badge/skills/youdotcom-oss/dx-toolkit/tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 652 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 88% copy Near-identical to another mod 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.00063 $0.00652
Opus 5.5 $0.00025 $0.00261
Sonnet 5.5 $0.00013 $0.00130
Haiku 4.5 $0.00006 $0.00065

Measured 1mo ago against content hash 201e3cab084c, 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.

Origin

This is a copy

88% identical to tdd — 7 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/tdd/SKILL.md · 68 lines

How it starts

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

Test-Driven Development

Core Rule

Work in vertical red-green-refactor slices:

  1. RED: write one test for one observable behavior.
  2. GREEN: implement the smallest production change that makes that test pass.
  3. REFACTOR: clean up only while tests are green.

Do not write a batch of imagined tests before implementation. Each new test should respond to what the last cycle taught you about the actual behavior and interface.

Defaults

  • Use bun test for targeted tests and bun run check:types for the type gate.
  • Use test, not it, and organize with describe.
  • Prefer real dependencies and real runtime boundaries over mocks.
  • Mock only external boundaries such as remote APIs, time, randomness, or rare filesystem cases.
  • Avoid conditional assertions: assert the branch first, then assert branch-specific values.
  • Test both branches for conditionals, fallbacks, and error paths.
  • Prefer one stable public/runtime interface for each behavior. If the operator contract is a CLI, test the CLI boundary instead of splitting coverage across private helpers or duplicate wrappers.
  • Exercise public interfaces and runtime contracts rather than private helpers.
  • Follow applicable repo skills and AGENTS.md rules for the touched area.

When Starting Work

Explore the codebase first. If the public interface, expected behavior, or risk boundary is discoverable from code, tests, or docs, use that evidence instead of asking the user.

Ask one concise question only when the decision cannot be discovered and a reasonable assumption would be risky. Include your recommended answer.

Before writing production code, identify:

  • the public interface or runtime boundary under test
  • the first observable behavior to prove
  • the targeted test command for the cycle
  • the broader validation needed before handoff

Cycle Discipline

For each behavior:

  1. Add or update exactly one focused test.
  2. Run the targeted test and confirm it fails for the intended reason.
  3. Implement only enough code to pass.
  4. Run the same targeted test and confirm it passes.
  5. Refactor if useful, then rerun the affected tests.

Read the full file on GitHub · 68 lines

Files

What ships with it

5 files 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 · 68 lines · 63 tokens per session scan A 201e3cab084c

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository youdotcom-oss/dx-toolkit (25 stars, last pushed 1mo ago), licensed MIT. It adds 63 tokens to every session and 652 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 88% identical to tdd, differing in 7 lines, and is treated as a copy.

Related

Other skills, from other repositories

tests-run

Execute Unity tests (EditMode or PlayMode) and return per-test results. Supports filtering by test assembly, namespace, class, and method. Refreshes the AssetDatabase first; defers execution across domain reloads if scripts changed. Precondition: every open scene must be saved — dirty scenes abort the run.

IvanMurzak/Unity-MCP · 68 tokens

opik-compare

Run a candidate against the baseline over an Opik test suite and read the numbers back — which cases broke, which got fixed, the per-metric deltas, worst rows, and whether the two runs are comparable — with the Opik compare-view link. Runs via the SDK; reads results via the MCP when connected. Does not issue a…

comet-ml/opik-mcp · 156 tokens

opik-test

Turn a failing Opik trace (or a described failure) into a repeatable regression check — a test-suite item with the trace's input and one or two binary assertions — so a fix can be verified by the compare skill. Works over the SDK; uses the MCP write tool when connected. Returns the suite, the item, and the assertion.…

comet-ml/opik-mcp · 141 tokens

opik-verify

Decide ship or hold for a candidate from the compare skill's numbers, against an explicit release policy — regressions, pass rate, safety-tagged cases, subgroup consistency, latency and cost budgets, flakiness, evidence size, and whether the judge is validated. Reads two experiments on an Opik test suite via the SDK…

comet-ml/opik-mcp · 145 tokens

qec-memory-experiment

A local simulation workflow for testing error correction in a small surface-code quantum memory. It adds a defined error rate, samples measurement results, and uses a matching decoder to estimate logical errors.

xi-zhao/OpenQuantum · 114 tokens

quantum-circuit-verification

A local checker for deciding whether two small OpenQASM 2 quantum circuits perform the same quantum transformation. OpenQASM 2 is a text format for describing quantum circuits.

xi-zhao/OpenQuantum · 118 tokens