tdd/SKILL.md
Test-Driven Development discipline. RED-GREEN-REFACTOR cycle enforcement. Use when writing new features or fixing bugs.
npx skillsauth add snqb/my-skills 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. Watch it fail. Write minimal code. Watch it pass. Repeat.
RED → GREEN → REFACTOR → commit
Thinking "skip TDD just this once"? That's rationalization. Stop.
| Don't | Do |
|-------|-----|
| Test mocks instead of real code | Test real code |
| test_retry_works | retries_failed_operations_3_times |
| Multiple behaviors in one test | One behavior per test |
| Keep "reference code" after deleting untested code | Delete all untested code |
def test_transfer_fails_when_insufficient_balance():
...
def test_transfer(): # What about transfer?
...
# RED: test expects add(2, 3) == 5
# GREEN (wrong - too much):
def add(a, b):
if not isinstance(a, (int, float)):
raise TypeError("...")
return a + b
# GREEN (right - just enough):
def add(a, b):
return a + b
documentation
Enrich Markdown articles with inline Wikipedia links. First mention of each notable entity gets a hyperlink. Use when asked to add wiki links, enrich, or add references to .md files.
development
Structured visual QA: screenshot → batch issues → fix all → verify. Replaces the 300-cycle screenshot→edit death spiral. Optional bishkek review as exit gate. Use when building/polishing UI with browser testing, or when user asks for N iterations/reviews.
development
Find complex code, analyze intent, recommend battle-tested library replacements. Uses radon/eslint for detection, GitHub quality search for alternatives.
research
Research real-world UI patterns from curated galleries (Collect UI, Component Gallery, Mobbin). Use when exploring what exists: dropdowns, accordions, inputs, navigation, cards, modals, etc.