Enforce TDD discipline: tests first, fix code not tests. Use when user says /tdd or /test.
View on GitHubplugins/tdd/skills/tdd/SKILL.md
February 1, 2026
Select agents to install to:
npx add-skill https://github.com/dohernandez/claude-skills/blob/main/plugins/tdd/skills/tdd/SKILL.md -a claude-code --skill tddInstallation paths:
.claude/skills/tdd/# TDD ## Purpose Enforce Test-Driven Development discipline. All changes must have tests written first, tests must fail before implementation, and when tests fail, fix the code not the tests. ## Quick Reference - **Setup**: `/tdd configure` (run once during framework setup) - **Usage**: `/tdd` (uses saved config) - **Update**: `/tdd learn <path>` (analyze specific path) - **Config**: `.claude/skills/tdd.yaml` ## Commands | Command | Purpose | When to Use | |---------|---------|-------------| | `/tdd configure` | Analyze entire project for test patterns | Framework setup / wizard | | `/tdd learn <path>` | Analyze specific path, update config | New module added | | `/tdd` | Write tests using saved patterns | Normal development | --- ## /tdd configure **When**: Framework setup wizard (one-time) **What it does**: 1. Scans entire project for testing patterns 2. Proposes findings to user 3. User approves/modifies 4. Saves to `.claude/skills/tdd.yaml` ### Discovery Process ``` 1. DETECT TEST FRAMEWORK ├─ JavaScript/TypeScript: package.json → jest, vitest, mocha, ava ├─ Python: pyproject.toml, requirements.txt → pytest, unittest ├─ Go: *_test.go files → go test └─ Rust: Cargo.toml → cargo test 2. FIND TEST LOCATIONS ├─ Co-located: src/**/*.test.ts ├─ Separate: tests/, __tests__/, test/ └─ Pattern: *.test.*, *_test.*, test_* 3. ANALYZE TEST STRUCTURE (read 5-10 test files) ├─ Organization: describe/it, class-based, function-based ├─ Assertion style: expect, assert, require ├─ Mock patterns: vi.fn(), jest.mock(), @patch, etc. └─ Fixture patterns: beforeEach, fixtures/, conftest.py 4. DETECT TEST COMMANDS ├─ Taskfile.yaml: task test, task test:unit ├─ package.json: npm test, npm run test:* ├─ Makefile: make test └─ Direct: pytest, go test, cargo test ``` ### Proposal Format ```yaml # Proposed TDD Configuration # Review and approve to save to .claude/skills/tdd.yaml framework: vitest language: typescript test_locat