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
- Identify the smallest observable behavior.
- Add or update a test to fail on current code.
- Run the smallest relevant test command (targeted if possible).
- Implement the minimal code to make it pass.
- Refactor with tests still green.
- Report: test command(s) run + results.