// Use PROACTIVELY when enforcing TDD red-green-refactor, setting up test infrastructure, configuring coverage gates, or implementing the Testing Trophy model. Installs git hooks, npm scripts, and CLAUDE.md configuration to enforce test-first development. Supports coverage thresholds and test distribution analysis. Not for prototypes or projects without test requirements.
| name | test-driven-development |
| version | 0.3.1 |
| description | Use PROACTIVELY when enforcing TDD red-green-refactor, setting up test infrastructure, configuring coverage gates, or implementing the Testing Trophy model. Installs git hooks, npm scripts, and CLAUDE.md configuration to enforce test-first development. Supports coverage thresholds and test distribution analysis. Not for prototypes or projects without test requirements. |
This skill enforces test-driven development (TDD) workflows when using Claude Code. Once installed, Claude will automatically follow red-green-refactor patterns without manual prompting.
Version: 0.3.0 Status: Stable
Automatic TDD Enforcement - When you ask Claude to implement a feature:
No manual prompting required - configured through CLAUDE.md.
Use when:
Don't use if:
From Kent C. Dodds: "Write tests. Not too many. Mostly integration."
| Type | Emphasis | Purpose |
|---|---|---|
| Integration | Majority | Test user workflows and component interactions |
| Unit | Smaller | Test complex isolated business logic |
| E2E | Minimal | Test critical user journeys only |
| Static | Base | TypeScript, ESLint (catches errors before runtime) |
Default thresholds (configurable):
| Metric | Threshold |
|---|---|
| Line coverage | 80% |
| Branch coverage | 75% |
| Function coverage | 90% |
The skill will:
test:tdd, test:red, test:green, validate:tdd)See workflow/installation-steps.md for detailed procedures.
npm run validate:tddSee reference/technical-details.md for full documentation.
| Issue | Solution |
|---|---|
| LLM not following TDD | Run npm run validate:tdd |
| Git hook blocking commits | Ensure tests exist, or git commit --no-verify |
| Want to remove | Run node .tdd-automation/scripts/rollback-tdd.js |
workflow/installation-steps.mdreference/technical-details.mdREADME.md