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.
npx agentmods add skills/harness-mini/harness-mini/tddnpx skills add harness-mini/harness-mini --skill tddgit clone --depth 1 https://github.com/harness-mini/harness-miniWrote 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/harness-mini/harness-mini/tdd)<a href="https://agentmods.dev/skills/harness-mini/harness-mini/tdd"><img src="https://agentmods.dev/badge/skills/harness-mini/harness-mini/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.00047 | $0.00548 |
| Opus 5 | $0.00023 | $0.00274 |
| Sonnet 5 | $0.00009 | $0.00110 |
| Haiku 4.5 | $0.00005 | $0.00055 |
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 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.
How it starts
The opening of the file, as written. The whole thing — 41 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Red → Green → Refactor. No step skipped, ever.
The loop (one issue)
- RED — write the smallest failing test that expresses the next bit of the issue's required behavior. Run it. Confirm it fails for the right reason.
- GREEN — write the minimum code to pass. No more. Run the test; confirm green. Resist building ahead of the test.
- REFACTOR — only now, and only under green: clean up via the
refactorskill (one named move at a time), re-running tests after each. Applyclean-codestandards. - Repeat until the issue's "done" condition holds — see the per-criterion rule below. "Done" is every acceptance criterion has its own test, gone red→green, not "the tests I happened to write are green."
Rules
- Never write production code without a failing test first.
- Never refactor while any test is red — green is the safety net.
- One red→green cycle per acceptance criterion. When the issue/spec enumerates N criteria, each gets its own failing test first — even if code written for an earlier criterion already happens to satisfy it. A criterion with no test that went red is not done; it's untested behavior that passed by luck.
- Keep each cycle tiny: a cycle that needs a checkpoint mid-way was too big.
- Trace transitions:
bin/trace.sh generator implement test result=red|green.
Discipline against false completion
A passing test you wrote is only as honest as the assertion. Prefer behavior the evaluator can independently verify (run the app, hit the endpoint) over self-referential assertions. The generator does not declare the issue "done" — it hands a green slice to the evaluator.
The "it generalized" trap. A clean implementation often satisfies criteria you never tested — e.g. one regex passing all five of a slug spec after a single test. Behavior-correct, coverage-blind: a later regression on the untested criteria sails through. Lock each criterion in with its own red→green cycle so the safety net has no holes. (This is exactly what the first real Cursor dogfood surfaced — see #29.)
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.
- 5d ago First seen · 41 lines · 47 tokens per session scan A 56906530ce39
tdd is a skill published in the GitHub repository harness-mini/harness-mini (2 stars, last pushed 24d ago), licensed MIT. It adds 47 tokens to every session and 548 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.
Other skills, from other repositories
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code.
test-driven-development
Drives development with tests. Use when implementing any logic, fixing any bug, or changing any behavior. Use when you need to prove that code works, when a bug report arrives, or when you're about to modify existing functionality.
test-driven-development
在实现任何功能或修复 bug 时使用,在编写实现代码之前.
skillshare-implement-feature
Implement a feature from a spec file or description using TDD workflow. Use this skill whenever the user asks to: add a new CLI command, implement a feature from a spec, build new functionality, add a flag, create a new internal package, or write Go code for skillshare. This skill enforces test-first development…
old-coder
Evidence-first development — surround the implementation with an executable spec and a gauntlet of constraints (tests, types, coverage, mutation) so line-by-line review becomes optional. Use when the user explicitly asks for high-assurance or evidence-first work ("reliable", "TDD", "prove it works", "I won't read the…
refactoring-patterns
Systematic refactoring techniques, code smell elimination, pattern extraction, and legacy modernization.