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/dastholo/lean-md/lmd-test-driven-developmentnpx skills add dasTholo/lean-md --skill lmd-test-driven-developmentgit clone --depth 1 https://github.com/dasTholo/lean-mdWrote 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/dastholo/lean-md/lmd-test-driven-development)<a href="https://agentmods.dev/skills/dastholo/lean-md/lmd-test-driven-development"><img src="https://agentmods.dev/badge/skills/dastholo/lean-md/lmd-test-driven-development.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 | $0.00019 | $0.00356 |
| Opus 5 | $0.00010 | $0.00178 |
| Sonnet 5 | $0.00004 | $0.00071 |
| Haiku 4.5 | $0.00002 | $0.00036 |
Grade A, and why
lmd-test-driven-development 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 3d 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 (lmd delegation stub)
Write the test first. Watch it fail. Write minimal code to pass. Core principle: If you didn't watch the test fail, you don't know if it tests the right thing. Violating the letter of the rules is violating the spirit of the rules.
Body renders one phase at a time — never read it from disk.
Rendering, diagnosis and fallback: see the lmd-rendering-skills skill.
When to Use
Always: new features · bug fixes · refactoring · behavior changes. Exceptions (ask your human partner): throwaway prototypes · generated code · config files. Thinking "skip TDD just this once"? Stop. That's rationalization.
The Iron Law
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
Wrote code before the test? Delete it. Start over. Delete means delete.
Phases
- red — write one failing test, then Verify RED (watch it fail correctly).
- green — minimal code to pass, then Verify GREEN.
- refactor — clean up only under green.
- rationalizations — read when tempted to skip a step.
Companions
When adding mocks or test utilities, render the companion to avoid common pitfalls:
testing-anti-patterns— testing mock behavior instead of real behavior, test-only methods on production classes, mocking without understanding dependencies.
Final Rule
Production code → test exists and failed first
Otherwise → not TDD
No exceptions without your human partner's permission.
What ships with it
3 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.
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.
- 3d ago First seen · 39 lines · 19 tokens per session scan A 445bff0f9eac
lmd-test-driven-development is a skill published in the GitHub repository dasTholo/lean-md (5 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 19 tokens to every session and 356 once invoked, about $0.0001 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
tdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
test-first-bugs
Enforces a test-driven bug-fixing workflow. Use when a user reports a bug, failing code, an error, or asks to fix something.
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.
white-box-red-testing
Find bugs by writing tests that should pass but don't. Invoke manually on user-chosen scope (commits, files, or coverage threshold). Outputs red tests with structured rationale. Use when user asks to "stress-test", "find bugs in", "attack", or "break" code.
tdd
Test-driven development (TDD) process used when writing code. Use whenever you are adding any new code, unless the user explicitly asks to skip TDD or the code is exploratory/spike.
go-rig
Use this skill when building, reviewing, or refactoring Go code that must follow strict design discipline — ATDD/TDD workflow, explicit dependency injection, package-boundary discipline, and structured code review. Complements CLAUDE.md by focusing on process and design judgment rather than version-specific Go…