dev-tdd/SKILL.md
Use when building features or fixing bugs using test-driven development, when the user mentions "red-green-refactor", wants integration-style tests, or asks for test-first development.
npx skillsauth add paulund/skills dev-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.
Tests verify behavior through public interfaces, not implementation details. Good tests survive refactors because they describe what the system does, not how.
Warning sign: tests break during refactors where behavior hasn't changed.
| File | Load when | |------|-----------| | tests.md | Writing or reviewing test cases — good vs. bad patterns | | mocking.md | Deciding what to mock or designing for mockability | | interface-design.md | Designing public interfaces for testability | | deep-modules.md | Evaluating module depth and interface size | | refactoring.md | Looking for refactor opportunities after GREEN |
Before writing any code:
Ask: "What should the public interface look like? Which behaviors are most important to test?"
You can't test everything. Confirm exactly which behaviors matter most. Focus on critical paths and complex logic, not every edge case.
Write ONE test that confirms ONE thing:
RED: Write test for first behavior → test fails
GREEN: Write minimal code to pass → test passes
For each remaining behavior:
RED: Write next test → fails
GREEN: Minimal code to pass → passes
Rules:
After all tests pass, check refactoring.md:
Never refactor while RED. Get to GREEN first.
MUST DO
MUST NOT DO
testing
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.
development
TypeScript project conventions. Auto-load when editing *.ts or *.tsx files.
development
Use when writing or fixing PHP code, implementing classes, traits, or interfaces, applying PSR standards, or working with PHP 8.3+ patterns like readonly properties, enums, named arguments, match expressions, and union types.
tools
Next.js 15 App Router project conventions. Auto-load when working in app/, src/app/, components/, server actions, or route handlers.