lmd-test-driven-development

lmd-test-driven-development is a skill for Claude Code, Codex from dasTholo/lean-md. It costs 19 tokens per session (356 once invoked), scanned A, original, Apache-2.0.

A Test-Driven Development (TDD) workflow that requires a failing test before production code is written. It then guides the work through failing, passing, and cleanup stages.

In plain words
What is it for?
Use it when adding features, fixing bugs, refactoring, or changing behavior. It does not cover throwaway prototypes, generated code, or configuration files unless your human partner agrees.
Why use it?
It helps catch incorrect assumptions early by proving that a test detects the intended failure before code fixes it. It also prevents features and bug fixes from being implemented without tests.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/dastholo/lean-md/lmd-test-driven-development
Any agent
npx skills add dasTholo/lean-md --skill lmd-test-driven-development
Clone the repo
git clone --depth 1 https://github.com/dasTholo/lean-md

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 lmd-test-driven-development

README.md
[![agentmods](https://agentmods.dev/badge/skills/dastholo/lean-md/lmd-test-driven-development.svg)](https://agentmods.dev/skills/dastholo/lean-md/lmd-test-driven-development)
Your own site
<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>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 356 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00019 $0.00356
Opus 5 $0.00010 $0.00178
Sonnet 5 $0.00004 $0.00071
Haiku 4.5 $0.00002 $0.00036

Measured 3d ago against content hash 445bff0f9eac, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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.

content/skills/lmd-test-driven-development/SKILL.md · 39 lines

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.

Files

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.

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. 3d ago First seen · 39 lines · 19 tokens per session scan A 445bff0f9eac

Subscribe to this mod's changes

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.

Related

Other skills, from other repositories