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/axiomantic/spellbook/test-driven-developmentnpx skills add axiomantic/spellbook --skill test-driven-developmentgit clone --depth 1 https://github.com/axiomantic/spellbookWrote 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/axiomantic/spellbook/test-driven-development)<a href="https://agentmods.dev/skills/axiomantic/spellbook/test-driven-development"><img src="https://agentmods.dev/badge/skills/axiomantic/spellbook/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.1 | $0.00069 | $0.04804 |
| Opus 5 | $0.00034 | $0.02402 |
| Sonnet 5 | $0.00014 | $0.00961 |
| Haiku 4.5 | $0.00007 | $0.00480 |
Grade A, and why
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 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.
How it starts
The opening of the file, as written. The whole thing — 487 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test-Driven Development
Invariant Principles
- Failure Proves Testing - Test passing immediately proves nothing. Only watching failure proves test detects what it claims.
- Order Creates Trust - Tests-first answer "what should this do?" Tests-after answer "what does this do?" Fundamentally different questions.
- Minimal Sufficiency - Write exactly enough code to pass. YAGNI violations compound into untested complexity.
- Deletion Over Adaptation - Code written before tests is contaminated. Keeping "as reference" means testing after. Delete means delete.
Violating the letter of the rules is violating the spirit of the rules.
Inputs
| Input | Required | Description |
|---|---|---|
| Feature/bugfix description | Yes | What behavior to implement or fix |
| Existing test patterns | No | Project's testing conventions and frameworks |
| API contracts | No | Expected interface signatures |
Outputs
| Output | Type | Description |
|---|---|---|
| Failing test | File | Test demonstrating missing behavior |
| Minimal implementation | File | Code passing the test |
| Test execution evidence | Inline | Observed failure before green |
When to Use
Always: new features, bug fixes, refactoring, behavior changes.
Exceptions (ask human partner; no human available? default: apply TDD):
- Throwaway prototypes
- Generated code
- Configuration files
Thinking "skip TDD just this once"? Stop. That's rationalization.
The Iron Law
NO PRODUCTION CODE WITHOUT FAILING TEST FIRST
Code before test? Delete. Start over. No "reference," no "adapting," no looking at it.
Reasoning Schema
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 First seen · 487 lines · 69 tokens per session scan A 334e2028ab4a
test-driven-development is a skill published in the GitHub repository axiomantic/spellbook (10 stars, last pushed 2d ago), licensed MIT. It adds 69 tokens to every session and 4,804 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-09-03.
Other skills, from other repositories
atomic-tdd
Test-first discipline. Auto-triggers on "let's implement X", "add feature Y", "fix bug Z", "write a test for", "implement", "build out", and similar pre-code-change phrases. Iron rule: failing test exists before production code. Skip only for pure docs/config changes with an explicit "skipped because:" note. Explicit…
k-feat
通过 Spec Clear 和目标行为 red → green 交付新增或变化的功能。.
k-implement
对着已有 spec 按切片做 TDD。无独立 Work 类型。.
react-web
React web development with hooks, React Query, Zustand.
iterative-development
TDD iteration loops using Claude Code Stop hooks - runs tests after each response, feeds failures back automatically.
python
Python development with ruff, mypy, pytest - TDD and type safety.