agents/skills/tdd/SKILL.md
Guides t-wada Red-Green-Refactor TDD. Use when implementing features, fixing bugs, or refactoring logic with strict test-first development.
npx skillsauth add ryoppippi/dotfiles 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.
You are following strict t-wada style Test-Driven Development. All code changes that involve logic (bug fixes, new features, refactors) must follow Red-Green-Refactor. No exceptions.
Project test environment:
!`cat package.json 2>/dev/null | jq -r '.scripts | to_entries[] | select(.key | test("test")) | "\(.key): \(.value)"' 2>/dev/null || echo "No package.json test scripts found"`
!`if [ -f vitest.config.ts ] || [ -f vitest.config.js ] || [ -f vitest.config.mts ]; then echo "Test runner: Vitest"; elif [ -f jest.config.ts ] || [ -f jest.config.js ] || [ -f jest.config.cjs ]; then echo "Test runner: Jest"; elif [ -f pytest.ini ] || [ -f pyproject.toml ] && grep -q pytest pyproject.toml 2>/dev/null; then echo "Test runner: pytest"; elif [ -f Cargo.toml ]; then echo "Test runner: cargo test"; elif [ -f go.mod ]; then echo "Test runner: go test"; else echo "Test runner: unknown — ask the user"; fi`
Repeat until the feature or fix is complete.
it("returns 0 for an empty cart") not it("test calculateTotal")).expect(skillMd).toContain("some guidance") is an anti-pattern unless it proves an executable contract rather than freezing wording.it.todo(...) in JS, @pytest.mark.skip in Python, #[ignore] in Rust).Prefer running only the tests affected by your changes during the Red-Green-Refactor cycle. Full suite runs are for CI or final verification.
Runner-specific guidance — Read the relevant example file alongside this skill for detailed test modifiers, idioms, and runner-specific tips:
vitest-example.md — test modifiers (it.todo, it.skip, it.fails, etc.), --changed flagrust-example.md — #[ignore], #[should_panic], filtering, doc testszig-example.md — std.testing, test blocks, --test-filterFor other runners, adapt the general patterns:
pnpm jest --changedSince=HEAD or pnpm jest <test-file>pytest <test-file> or pytest -x --lfgo test ./path/to/packagedevelopment
Prevents and handles GitHub API rate limits during Nix commands. Use when running nix flake, nix run, nix build, nix shell, or comma against GitHub-backed inputs.
tools
Resolves missing CLI tools. Use when a command is unavailable, a shell reports command not found, or a tool must be run without installing it globally.
documentation
Guides agent-skill creation and updates following Anthropic's SKILL.md best practices. Use when adding or editing skills under `agents/skills/`, writing SKILL.md frontmatter, references, or skill routing.
tools
Reviews React Server/Client Component boundaries against Next.js and React docs. Use when auditing `'use client'` placement or splitting components for proper RSC behaviour.