← ClaudeAtlas

test-driven-developmentlisted

Drives changes with the red-green-refactor loop. Use when implementing logic, fixing a bug or changing behavior, or when asked to add tests, even when the code is pasted inline, the request does not mention tests and the answer looks obvious. Writes the failing test first, never the change alone.
PickleBoxer/pickle · ★ 0 · Testing & QA · score 75
Install: claude install-skill PickleBoxer/pickle
# Test-Driven Development ## Overview Write a failing test before writing the code that makes it pass. For bug fixes, reproduce the bug with a test before attempting a fix. Tests are proof — "seems right" is not done. A codebase with good tests is an AI agent's superpower; a codebase without tests is a liability. ## When to Use - Implementing any new logic or behavior - Fixing any bug (the Prove-It Pattern) - Modifying existing functionality - Adding edge case handling - Any change that could break existing behavior **When NOT to use:** Pure configuration changes, documentation updates, or static content changes that have no behavioral impact. **Related:** For browser-based changes, combine TDD with runtime verification using Chrome DevTools MCP — see the Browser Testing section below. ## Discover the Stack First The TDD cycle is universal; the commands are not. Before writing the first test, discover how *this* repository tests, and use its commands for every RED, GREEN, and verification step: - **Language and build system** — `package.json`, `composer.json`, `Package.swift` or an `*.xcodeproj`, `pom.xml`/`build.gradle`, `pyproject.toml`, `go.mod`, `Cargo.toml`, `Gemfile`, a `Makefile` - **Project scripts** — `scripts` in `composer.json` or `package.json`, and `Makefile` targets (`composer test`, `npm test`, `make test`). These are the repository's own commands; use them first - **Checked-in wrappers** — prefer `./gradlew`, `./mvnw`, `make test`, or a repo script ov