Borrowing it
Nothing to install: this file belongs to nicograef/handbook. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/nicograef/handbook/main/.claude/skills/tdd/SKILL.mdgit clone --depth 1 https://github.com/nicograef/handbookWrote 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.
[](https://agentmods.dev/skills/nicograef/handbook/tdd)<a href="https://agentmods.dev/skills/nicograef/handbook/tdd"><img src="https://agentmods.dev/badge/skills/nicograef/handbook/tdd.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00051 | $0.00410 |
| Opus 5 | $0.00026 | $0.00205 |
| Sonnet 5 | $0.00010 | $0.00082 |
| Haiku 4.5 | $0.00005 | $0.00041 |
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 2d 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.
What it actually says
Test-Driven Development
See anti-patterns.md for worked examples of implementation-coupled tests and mocking.md for mocking guidelines.
Workflow
1. Planning
Confirm the interface and the behaviors to test with the user. Apply the deep-module checklist (write-prd/SKILL.md step 5). List behaviors, not implementation steps, and get approval before coding.
You can't test everything. Ask what the interface should look like, and which behaviors matter most. Focus on critical paths and complex logic, not every edge case.
2. Tracer Bullet
Write ONE test that confirms ONE thing about the system:
RED: Write test for first behavior → test fails
VERIFY: Confirm it fails for the EXPECTED reason (missing feature, not a
typo or syntax error)
GREEN: Write minimal code to pass → test passes
VERIFY: Confirm it passes AND all other tests still pass, with clean output
3. Refactor
After all tests pass, look for refactor candidates and run tests after each refactor step. Never refactor while RED — get to GREEN first.
Constraints
- One test at a time; write only enough code to pass the current test.
- Don't anticipate future tests or add speculative features.
- Test observable behavior through public interfaces — never private methods or internal collaborators.
- Get user approval on the behavior list before writing code.
Quality
- Once the feature or fix is done, run the shared self-review checklist on it.
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.
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.
- 2d ago Changed · -57 lines fe62690b6f10
- 6d ago First seen · 103 lines · 51 tokens per session scan A ecdfb1aa7af9
tdd is a skill published in the GitHub repository nicograef/handbook (2 stars, last pushed 3d ago), licensed MIT. It adds 51 tokens to every session and 410 once invoked, about $0.0003 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.
Other skills, from other repositories
engram-testing-coverage
TDD and coverage standards for Engram. Trigger: When implementing behavior changes in any package.
nw-fp-clojure
Clojure language-specific patterns, data-first modeling, REPL-driven development, and spec.
strict-tdd
Strict RED->GREEN->REFACTOR test-driven development with enforcement. Never write production code before a failing test. Atomic commits per TDD cycle.
conductor-implement
Execute tasks from a track's implementation plan following TDD workflow.
tdd
This skill should be used when the user wants to implement features or fix bugs using test-driven development. Enforces the RED-GREEN-REFACTOR cycle with vertical slicing, context isolation between test writing and implementation, human checkpoints, and auto-test feedback loops. Uses multi-agent orchestration with the…
mobiai-mobile-tdd
You MUST use this before writing any implementation code for a mobile feature, bug fix, refactor, or behavior change. Tests come before implementation — no exceptions.