tdd
Skill14 starsChanged 37 days agoMITView on GitHub
Test-Driven Development with enforced RED-GREEN-REFACTOR cycle and Git checkpoints per phase. Use for new testable features and bug fixes (reproduction test first) — not for config, docs, or renames.
194 other projects use a version of this.
Adopted by
Most recently taken up by
- ishandutta2007/Awesome-Claude-Skillstheir own version, first seen Nov 8, 2026
- trpc/trpctheir own version, first seen Nov 8, 2026
- wowyuarm/dsh-agent-teamtheir own version, first seen Nov 8, 2026
- Contexera/dsh-agent-teamtheir own version, first seen Nov 8, 2026
- Dimon94/dveritytheir own version, first seen Nov 8, 2026
- Dimon94/skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use capture-learning-tools, design-frontend-dev and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
The-Vibe-CompanySkillcapture-learning-tools
Turn technical conversations, bugs, CI failures, review comments,
Also in 5 projects that use this
The-Vibe-CompanySkilldesign-frontend-dev
Clean Impeccable frontend design skill. Use when the user wants to
Also in 5 projects that use this
tristanphvnSkillketchup-video
Catch the user up like /keel:ketchup, with a short silent video of slides for what happened and the waiting calls as text under it. Use for /keel:ketchup-video.
Also in 14 projects that use this
jaydubya818Skillfigure-it-out
Use when novel or multi-phase work needs an auditable workflow and no narrower playbook fits.
Also in 54 projects that use this
jaydubya818Skillprinciple-laziness-protocol
Apply when a refactor is adding wrappers or abstractions instead of simplifying.
Also in 45 projects that use this
- +2 more from The-Vibe-Company
- +5 more from jaydubya818
Other versions194 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 194
- mattpocock/skills★ 309ksame name
- trpc/trpc★ 41ksame name
- Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
- Yeachan-Heo/oh-my-claudecode★ 41ksame name
- QuivrHQ/quivr★ 40ksame name
- The-Vibe-Company/quivr★ 40ksame name
- ccusage/ccusage★ 19ksame name
- ryoppippi/ccusage★ 19ksame name
- MODSetter/SurfSense★ 17ksame name
- GreyDGL/PentestGPT★ 16ksame name
184 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository44 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- adaptSkill
- animateSkill
- auditSkill
- bolderSkill
- brainstormSkill
- build-fixSkill
- business-panelSkill
- checkpointSkill
- clarifySkill
- colorizeSkill
- composition-patternsSkill
- confidence-checkSkill
- config-doctorSkill
- critiqueSkill
- delightSkill
- design-auditSkill
- devils-advocateSkill
- distillSkill
- eval-harnessSkill
- feature-plannerSkill
- fix-prSkill
- frontend-designSkill
- gap-analysisSkill
- grill-with-docsSkill
- hardenSkill
- impeccableSkill
- layoutSkill
- learnSkill
- optimizeSkill
- overdriveSkill
- polishSkill
- pytest-runnerSkill
- python-best-practicesSkill
- quieterSkill
- react-best-practicesSkill
- sc-helpSkill
- security-auditSkill
- shapeSkill
- typesetSkill
- ui-ux-pro-maxSkill
- uv-packageSkill
- verifySkill
- web-design-guidelinesSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 15 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 186 edited versions we read keep these.
15
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Do NOT use for: config changes, documentation, simple renames, UI-only changes
- Distinctive: line 53
Goal: Write a test that describes the desired behavior.
- Distinctive: line 56
Write the test FIRST — before any production code
- Distinctive: line 57
Test should be minimal: one behavior per test
- Distinctive: line 58
Run the test suite and confirm failure
- Distinctive: line 66
Test fails with assertion error (expected behavior not implemented)
- Distinctive: line 67
Test fails with compile/import error (function/class doesn't exist yet)
- Distinctive: line 70
Test fails because of typo in test code
- Distinctive: line 71
Test fails because test framework misconfigured
- Distinctive: line 80
Goal: Write the MINIMUM production code to make the test pass.
- Distinctive: line 83
Only write code that the failing test requires
- Distinctive: line 106
Run tests after EVERY change — if any test breaks, revert immediately
- Distinctive: line 117
All requirements met? → Run full test suite → Report coverage
- Distinctive: line 121
After all cycles complete:
- Distinctive: line 140
Test-to-test dependencies (each test must be independent)
“Common” is measured: kept by at least 6 in 10 of the 186 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
When to Use
Use proactively when:
- New feature implementation with testable behavior
- Bug fix (write reproduction test first)
- User explicitly requests TDD approach
Triggers: TDD, test-driven, test first, red green refactor, write test first, failing test, reproduction test
Do NOT use for: config changes, documentation, simple renames, UI-only changes
Dynamic Context
Recent TDD commits:
!git log --oneline -5 --grep="red:\|green:\|refactor:" 2>/dev/null || echo "No TDD commits found"
Test infrastructure:
!ls tests/ __tests__/ test/ 2>/dev/null | head -10 || echo "No test directory found"
TDD Workflow Skill
Purpose
Enforce disciplined RED-GREEN-REFACTOR cycle with Git checkpoints to prevent skipping steps.
Usage
/tdd "user login validation" # new feature
/tdd "fix: timeout on large files" # bug reproduction
/tdd # prompt for descriptionThe Cycle
RED → GREEN → REFACTOR → (repeat)
│ │ │
│ │ └─ git commit "refactor: ..."
│ └─ git commit "green: ..."
└─ git commit "red: ..."Phase 1: RED (Write Failing Test)
Goal: Write a test that describes the desired behavior. It MUST fail.
Rules
- Write the test FIRST — before any production code
- Test should be minimal: one behavior per test
- Run the test suite and confirm failure
RED Gate (CRITICAL)
DO NOT edit production code until RED state is confirmed.Acceptable RED states:
- Test fails with assertion error (expected behavior not implemented)
- Test fails with compile/import error (function/class doesn't exist yet)
NOT acceptable:
- Test fails because of typo in test code
- Test fails because test framework misconfigured
Checkpoint
git add -A && git commit -m "red: [describe expected behavior]"Phase 2: GREEN (Make It Pass)
Goal: Write the MINIMUM production code to make the test pass. Nothing more.
Rules
- Only write code that the failing test requires
- No premature optimization
- No extra features
- "Fake it till you make it" is valid (hardcoded returns → generalize later)
GREEN Gate
ALL tests must pass. No new test failures introduced.Checkpoint
git add -A && git commit -m "green: [describe what was implemented]"Phase 3: REFACTOR (Clean Up)
Goal: Improve code quality without changing behavior. Tests stay green throughout.
Rules
- Extract duplications
- Rename for clarity
- Simplify logic
- Run tests after EVERY change — if any test breaks, revert immediately
Checkpoint
git add -A && git commit -m "refactor: [describe improvement]"Cycle Completion
After REFACTOR, evaluate:
- More behaviors to implement? → Start new RED phase
- All requirements met? → Run full test suite → Report coverage
Coverage Gate
After all cycles complete:
# JavaScript/TypeScript
pnpm test -- --coverage
# Python
pytest --cov --cov-report=term-missingMinimum threshold: Report actual coverage. Flag untested paths. Do not set arbitrary percentage targets unless the project defines one.
Anti-patterns — Must Avoid
- Writing production code before test (defeats TDD purpose)
- Writing test that already passes (not RED)
- Skipping REFACTOR phase ("it works, ship it")
- Testing implementation details instead of behavior
- Brittle selectors (CSS classes, DOM structure) in tests
- Test-to-test dependencies (each test must be independent)
- Large RED→GREEN jumps (write too much code at once)
Integration with Verification Iron Law
TDD checkpoints feed directly into the Verification Iron Law:
- RED commit = evidence that test correctly fails
- GREEN commit = evidence that implementation works
- REFACTOR commit = evidence that tests remain green after cleanup
Each commit is a verification artifact.
Output Format
## TDD Cycle 1: [behavior]
### RED
- Test: `test/auth.test.ts` — `should reject empty password`
- Status: FAIL ✓ (assertion error: expected rejection)
- Commit: `red: reject empty password validation`
### GREEN
- Implementation: `src/auth.ts:validatePassword()`
- Status: ALL PASS ✓
- Commit: `green: implement password validation`
### REFACTOR
- Change: extracted validation rules to constants
- Status: ALL PASS ✓
- Commit: `refactor: extract validation constants`
## Coverage: 87% (src/auth.ts: 100%)Related Skills
/pytest-runner- Python test execution/verify- Post-implementation verification/confidence-check- Pre-implementation assessment
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

