standards-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 standards-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
development
Use when the user wants to run the project's lint + types + build sequence as a gate before pushing, opening a PR, or merging. Invoked by chained dev skills between phases. Trigger phrases - "/quality-gate", "run the quality gate", "check it builds".
tools
Use when the user wants to verify a PR's feature works at runtime by booting the dev server, exercising the affected UI via Chrome DevTools MCP, and posting a screenshot summary back to the PR. Idempotent — skips if `verified` or `verify-failed` is already on the PR. Trigger phrases - "/pr-verify", "verify this PR", "runtime check the pr".
testing
Use when the user wants a security-focused review pass on a PR with findings actioned as commits on the same branch. Trigger phrases - "/pr-security-review", "security review and fix".
testing
Use when the user wants to open a pull request for an already-pushed branch that implements a specific issue. Idempotent — returns the existing PR if one is already open for the branch. Trigger phrases - "/pr-open", "open the pr", "create pr for this branch".