Skip to content
FunCoding

tdd

Builds a requested feature test-first, one behavior at a time, and stops at a diff for review. Use when the user asks for a new function or feature, or says test-first or TDD.

Star
3,744
Last commit
Dec 1, 2026

solutions/i-1/dot-claude/skills/tdd/SKILL.md

View on GitHub

Build this test-first, one behavior at a time: $ARGUMENTS

  1. Red: write one failing test for the next behavior. Run the tests and confirm that it fails, and fails for the reason you expect. Don't change code outside the tests in this step.
  2. Green: write the least code that makes the new test pass, then run the whole test suite and confirm that every test passes. Don't change the tests in this step.
  3. Refactor: improve the names and structure of the code you just wrote without changing what it does, and run the tests again. They must still pass.

Repeat until the feature is done, then run the whole test suite and show the diff. Don't commit: the user reviews the diff and commits.

Similar Skills

rea-analysis-optimization

MOmorluto/rea486k8,943 new stars in the last 7 days

Featured

diagnosing-bugs

Diagnose hard bugs and performance regressions by building a feedback loop with tests or scripts.

MAmattpocock/skills337k4,978 new stars in the last 7 days

setup-ts-deep-modules

MAmattpocock/skills337k4,978 new stars in the last 7 days

code-review

MAmattpocock/skills337k4,978 new stars in the last 7 days

tdd

MAmattpocock/skills337k4,978 new stars in the last 7 days

retro

MAmattpocock/skills337k4,978 new stars in the last 7 days