Agent skill · Testing & QA

test-driven-development

Drives development with tests. Use when implementing any logic, fixing any bug, or changing any behavior. Use when you need to prove that code works, when a bug report arrives, or when you're about to modify existing functionality.

addyosmanigithub.com/addyosmaniGitHub ↗
claude-codecodexcursorMIT
Install
npx skills add addyosmani/agent-skills --skill test-driven-development --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 16 KB
Bundled scripts: none
Path: skills/test-driven-development/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 81,574
Language: JavaScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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`, `pom.xml`/`build.gradle`, `pyproject.toml`, `go.mod`, `Cargo.toml`, `Gemfile`, a `Makefile` - **Checked-in wrappers** — prefer `./gradlew`,

What's inside
Steps it walks through
  1. Overview
  2. When to Use
  3. Discover the Stack First
  4. The TDD Cycle
  5. Step 1: RED — Write a Failing Test
  6. Step 2: GREEN — Make It Pass
  7. Step 3: REFACTOR — Clean Up
  8. The Prove-It Pattern (Bug Fixes)
  9. The Test Pyramid
  10. Test Sizes (Resource Model)
  11. Decision Guide
  12. Writing Good Tests
  13. Test State, Not Interactions
  14. DAMP Over DRY in Tests
More from agent-skills
All skills →
About this skill
What does the test-driven-development skill do?

Drives development with tests. Use when implementing any logic, fixing any bug, or changing any behavior. Use when you need to prove that code works, when a bug report arrives, or when you're about to modify existing functionality.

How do I install it?

Run `npx skills add addyosmani/agent-skills --skill test-driven-development --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From addyosmani/agent-skills, a repository with 81,574 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going