tdd

Installation
SKILL.md

TDD

Choose the signal

Inspect the existing tests and public contract; use the cheapest trustworthy boundary that exercises the real behavior. For a defect already captured by an existing test, add no tests or parameter rows; fix production code and only delete invalid or redundant tests. Otherwise extend an existing case before adding one for a worthwhile gap. Count parameter rows, fixtures, environment startup, and CI work as test cost, not just test functions. If no trustworthy automated signal exists, use the nearest reliable check and state the gap; do not manufacture a test seam.

RED → GREEN → REFACTOR

  1. RED: Express one valuable behavior and observe failure for the predicted reason before changing production code; an existing failing test already supplies RED.
  2. GREEN: Make the smallest production change that passes, then run affected checks.
  3. REFACTOR: Simplify implementation and tests while preserving behavior, then choose the next needed behavior.

Do not write a batch of tests followed by a batch of implementation.

If a behavior already passes, verify it without undoing working code to manufacture RED.

Installs
10
GitHub Stars
12
First Seen
Jul 13, 2026