tdd-red-green-refactor

Installation
SKILL.md

TDD Red / Green / Refactor

Use this skill whenever making code changes that should be covered by tests.

Non-negotiables

  • Start with a failing test that expresses the behavior (red).
  • Implement the smallest change to pass (green).
  • Refactor for clarity/structure after green, keeping tests passing.
  • If no tests exist, add a minimal test harness + a failing test first.

Workflow

  1. Identify the smallest observable behavior.
  2. Add or update a test to fail on current code.
  3. Run the smallest relevant test command (targeted if possible).
  4. Implement the minimal code to make it pass.
  5. Refactor with tests still green.
  6. Report: test command(s) run + results.

If tests cannot run

Related skills
Installs
2
First Seen
Feb 28, 2026