New advertisers: 50% off your first month with code FIRSTMONTHSee slots
addyosmani avatar

Test Driven Development

Structured red-green-refactor workflow that writes a failing test before any code change, including bug fixes.

skills.sh installs
75.8K
GitHub stars
119.7K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers the full TDD loop (RED, GREEN, REFACTOR) plus a Prove-It Pattern that reproduces a reported bug with a test first
  • Includes a test pyramid guide (roughly 80% unit, 15% integration, 5% E2E) and a small, medium, and large test size model
  • Enforces discovering the repository's own build and test commands, and running the full suite before completion
  • Designed for agents implementing logic, fixing bugs, or modifying behavior in existing code

Install

$ npx -y skills add addyosmani/agent-skills --skill test-driven-development -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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:

Details

Repository
github.com/addyosmani/agent-skills
Categories
Testing & QA, Agent Workflow & Planning
First seen
May 16, 2026

More from addyosmani/agent-skills

All 25

Similar to Test Driven Development

More Testing & QA