skills/eng-tdd/SKILL.md
Enforces disciplined RED-GREEN-REFACTOR cycle—write failing test first, watch it fail, write minimal code to pass, then refactor.
npx skillsauth add tjboudreaux/cc-plugin-engineering-excellence eng-tddInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Write the test first. Watch it fail. Implement just enough to pass. Refactor while staying green. If you didn’t see the test fail, you don’t know whether it tests the right behavior.
Iron Law
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
Wrote code before the test? Delete it. Start from tests.
| Good | Bad |
|------|-----|
| Tests one thing | Vague “does work” |
| Clear name | test1 |
| Real behavior | Asserts on mocks |
| Excuse | Response | |--------|----------| | “Too simple” | Simple code breaks—test anyway. | | “I’ll test later” | Tests-after confirm existing behavior, not requirements. | | “Manual testing is enough” | No record or rerun; automation is required. | | “Deleting work is wasteful” | Sunk cost; untested code is debt. | | “Being pragmatic” | TDD prevents debugging hell; pragmatism = reliability. |
Failed any item? You skipped TDD—start over.
Production code exists only alongside a test that failed before the code was written. Otherwise, redo it with TDD.
tools
Systematic debugging playbook for tracing failures backward through the call chain, adding instrumentation, and fixing bugs at their origin.
testing
Startup protocol for every task—discover applicable skills, run them, announce usage, and follow required workflows (brainstorming, TodoWrite checklists, etc.).
testing
Mandatory checklist before claiming work is complete—run the evidence-producing command, inspect output, and only then state a result.
testing
Anchor every engineering decision in user value, measurable outcomes, accessibility, and cross-platform experience coherence.