← ClaudeAtlas

tddlisted

Enforces strict Test-Driven Development with RED-GREEN-REFACTOR cycles. Writes one failing test at a time, implements minimal code to pass, then refactors. Uses subagent isolation to prevent tests-by-construction. Pairs with the `code-quality` skill: invokes `Skill('code-quality')` during the REFACTOR phase to apply the full code-quality rule set against the GREEN output, and cites refactor recipes (R1–R20) by ID when reporting changes. Triggers on: "tdd", "write tests", "test this", "add test coverage", "test driven", "red green refactor", "/tdd".
mthines/agent-skills · ★ 4 · Testing & QA · score 83
Install: claude install-skill mthines/agent-skills
# Test-Driven Development Enforce strict RED-GREEN-REFACTOR discipline. One test at a time. Tests describe WHAT the system does, never HOW. --- ## Input Check `$ARGUMENTS` for the feature or behavior description. - If `$ARGUMENTS` contains a feature description, use it directly. - If `$ARGUMENTS` contains **"after"** (e.g., `/tdd after`), run in **Test-After Mode** — write tests for existing code. See `rules/test-after.md`. - If `$ARGUMENTS` is empty, ask the user what behavior they want to implement or test. --- ## Step 0: Discover Project Test Setup Before writing any tests: 1. **Find existing tests** — glob for `**/*.test.*`, `**/*.spec.*`, `**/*_test.*`, `**/test_*.*`, `**/tests/**` to identify the test framework, naming conventions, and directory structure. 2. **Find the test runner** — check `package.json` scripts, `Makefile`, `pyproject.toml`, `Cargo.toml`, `go.mod`, or similar for the test command. 3. **Adopt existing patterns** — match the project's test style exactly: same imports, same assertion library, same file naming, same directory placement. Never introduce a new test framework or pattern. 4. **Identify the run command** — store it mentally as `TEST_CMD` for use throughout the cycle. If you can run a single test file or test case, prefer that over the full suite. If no tests exist yet, ask the user which framework to use before proceeding. --- ## Step 1: Prioritize by Business Criticality Before diving into implementation, identify what matters m