tdd

tdd is a skill for Claude Code from RobinNorberg/oh-my-copilot. It costs 43 tokens per session (467 once invoked), scanned A, a copy of tdd, MIT.

A test-first development guide that builds one small test and one implementation at a time at agreed code boundaries. TDD means writing a failing test before the code that makes it pass.

In plain words
What is it for?
Use it to develop behavior in small steps, check that tests genuinely fail before implementation, and control where substitutions such as test doubles are allowed.
Why use it?
It prevents tests from merely copying the implementation and keeps each change tied to an independently known expected result.

Skill for Claude Code

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

Part of the oh-my-copilot plugin — 63 skills, 21 commands, 20 agents, 11 hooks, 1 MCP server shipped together

Good fit Use it to develop behavior in small steps, check that tests genuinely fail before implementation, and control where substitutions such as test doubles are allowed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/robinnorberg/oh-my-copilot/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 RobinNorberg/oh-my-copilot --skill tdd
Clone the repo
git clone --depth 1 https://github.com/RobinNorberg/oh-my-copilot

Made for: Claude Code.

Or install oh-my-copilot, the plugin that ships this one along with the rest of its 63 skills, 21 commands, 20 agents, 11 hooks, 1 MCP server.

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/robinnorberg/oh-my-copilot/tdd/github.svg)](https://agentmods.dev/skills/robinnorberg/oh-my-copilot/tdd)
Your own site
<a href="https://agentmods.dev/skills/robinnorberg/oh-my-copilot/tdd"><img src="https://agentmods.dev/badge/skills/robinnorberg/oh-my-copilot/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/robinnorberg/oh-my-copilot/tdd"><img src="https://agentmods.dev/badge/skills/robinnorberg/oh-my-copilot/tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 467 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 100% 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.00043 $0.00467
Opus 5.5 $0.00017 $0.00187
Sonnet 5.5 $0.00009 $0.00093
Haiku 4.5 $0.00004 $0.00047

Measured 4d ago against content hash b7270923ba70, 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 4d 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

100% identical to tdd — 0 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.

skills/tdd/SKILL.md · 35 lines

What it actually says

TDD

Red-green in small steps, at seams that were agreed in advance. In a launch run the seam list is C2's approved output; outside launch, agree the seams with the user before the first test exists — a seam nobody approved gets no tests.

The loop

One test → one implementation → repeat:

  1. Write the next test at a seam. Run it. Watch it fail for the reason you expect — a test that cannot fail is not a test.
  2. Implement the smallest change that turns it green.
  3. Repeat. Each test is a tracer bullet: a narrow but complete path through the behavior, not a layer finished in isolation.

Rules

  • Expected values come from an independent source of truth — a spec line, a worked example, a documented output. Never from the implementation under test: a test that asserts what the code happens to do is a mirror, not a check.
  • Substitute at the seam's declared boundary class only — in-process, locally substitutable, owned-remote port, or true-external, the class C2 records for each seam. No substitutes inside the boundary the test is exercising.
  • Refactoring is not part of the loop. It belongs to the review stage; the repair worker owns it. Do not refactor mid-red-green.
  • A bug fix starts with the failing test that reproduces it — reproduction before theory, the debugger's rule.
  • When proposing a seam, say in one line what it catches and what it lets through — a seam choice nobody can price is a guess, not a decision.

When no seam fits

If the behavior cannot be tested at any approved seam, stop and say so: report the missing seam as a finding (it feeds architecture-survey and refit) rather than inventing a seam or testing through internals.

Output

  • The seam list used, with boundary classes and each seam's catch/miss line
  • Red/green evidence — the failing run and the passing run
  • Any seam-absence findings
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. 4d ago Changed · +1 lines b7270923ba70
  2. 13d ago First seen · 34 lines · 43 tokens per session scan A 22162a172929

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository RobinNorberg/oh-my-copilot (5 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 467 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to tdd, differing in 0 lines, and is treated as a copy.