TDD Guard is an automated tool for Claude Code that checks whether coding work follows test-driven development by blocking implementation when required tests are missing or the code exceeds current test needs. It is for developers who want an AI coding agent to write failing tests first, implement minimally, and refactor according to configured lint rules.
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 skills add nizos/tdd-guard --skill setupgit clone --depth 1 https://github.com/nizos/tdd-guardWrote 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/nizos/tdd-guard/setup)<a href="https://agentmods.dev/skills/nizos/tdd-guard/setup"><img src="https://agentmods.dev/badge/skills/nizos/tdd-guard/setup/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/nizos/tdd-guard/setup"><img src="https://agentmods.dev/badge/skills/nizos/tdd-guard/setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00039 | $0.01396 |
| Opus 5.5 | $0.00016 | $0.00558 |
| Sonnet 5.5 | $0.00008 | $0.00279 |
| Haiku 4.5 | $0.00004 | $0.00140 |
Grade A, and why
setup 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 1mo 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 — 151 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TDD Guard Setup
Set up TDD Guard for the current project. Your goal is to:
- Identify the test framework(s) used in this project
- Install the matching TDD Guard reporter, or update it if already present
- Configure the reporter, or migrate an existing configuration to match the current specification
Reporter packages
| Framework | Reporter package | Registry |
|---|---|---|
| Vitest | tdd-guard-vitest | npm |
| Jest | tdd-guard-jest | npm |
| Storybook | tdd-guard-storybook | npm |
| pytest | tdd-guard-pytest | PyPI |
| PHPUnit | tdd-guard/phpunit | Packagist |
| Go | github.com/nizos/tdd-guard/reporters/go/cmd/tdd-guard-go | go install |
| Rust | tdd-guard-rust | crates.io |
| RSpec | tdd-guard-rspec | RubyGems |
| Minitest | tdd-guard-minitest | RubyGems |
Reporter configuration
All reporters write test results to .claude/tdd-guard/data/test.json relative to the project root.
Vitest — Add the reporter entry to the reporters array with projectRoot in the options object.
reporters: [
'default',
['tdd-guard-vitest', { projectRoot: '/absolute/path/to/project' }],
]
Jest — Add reporter entry to the reporters array with projectRoot option.
reporters: [
'default',
['tdd-guard-jest', { projectRoot: '/absolute/path/to/project' }],
]
Storybook — Construct StorybookReporter in .storybook/test-runner.ts and wire it into the postVisit hook.
// .storybook/test-runner.ts
import { StorybookReporter } from 'tdd-guard-storybook'
const reporter = new StorybookReporter({
projectRoot: '/absolute/path/to/project',
})
module.exports = {
async postVisit(page, context) {
await reporter.onStoryResult(context)
},
}
process.on('exit', () => {
reporter.onComplete()
})
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.
- 1mo ago First seen · 151 lines · 39 tokens per session scan A 1a5786af139b
setup is a skill published in the GitHub repository nizos/tdd-guard (2,362 stars, last pushed 7d ago), licensed MIT. It adds 39 tokens to every session and 1,396 once invoked, about $0.0002 per session on Opus 5.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-30.
Other skills, from other repositories
tdd
Test-first at pre-agreed seams — one test, one implementation, tracer-bullet red/green; independent expected values; substitutions only at the seam's boundary class; launch Phase 4 reference.
moai-workflow-tdd
Test-Driven Development workflow specialist using RED-GREEN-REFACTOR cycle for test-first software development. Use when developing new features from scratch or when behavior specification drives implementation.
tdd
Build this test-first, one behavior at a time: $ARGUMENTS.
software-code-refactoring
Improve production code quality while preserving all existing test behavior. Commonly used for the Refactor phase of TDD red-green-refactor, but applicable to any codebase with tests. Use when production code works but needs cleanup — reducing duplication, improving naming, simplifying complexity, aligning with…
moai-run
Implement SPEC requirements using DDD/TDD methodology.
testing-principles
Language-agnostic testing principles for choosing which tests a change needs, test quality, and proof ownership, with frontend and browser E2E implementation references. Use when writing tests, deciding test scope, or reviewing test quality.