addyosmani avatar

Test Driven Development

This puts tests first in your development workflow, red-green-refactor style. Write a failing test, make it pass with minimal code, then clean up. The real win is the Prove-It Pattern for bugs: reproduce the issue with a test before you fix anything, so you know it's actually fixed and won't regress. The guide includes practical stuff like the test pyramid (80% unit, 15% integration, 5% E2E), testing state over interactions, and when to use real implementations versus mocks. If you're working with an AI agent on a codebase without tests, you're flying blind. This gives you the proof that changes actually work.

install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
5
skills.sh installs
71.3K
GitHub stars
114.6K
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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:

Sponsors

Details

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

More from addyosmani/agent-skills

All 25
1convex avatarconvex-testconvex/agent-skillsGenerate convex-test tests for the app's Convex functions.41.1Kskills.sh installs
2openai avatarplaywrightopenai/skillsUse when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction, UI-flow debugging) vi9.3Kskills.sh installs
3github avatarbreakdown-testgithub/awesome-copilotTest Planning and Quality Assurance prompt that generates comprehensive test strategies, task breakdowns, and quality validation plans for GitHub projects.9.3Kskills.sh installs
4affaan-m avatargolang-testingaffaan-m/everything-claude-codegolang testing8.4Kskills.sh installs
5affaan-m avatartdd-workflowaffaan-m/everything-claude-codetdd workflow6.9Kskills.sh installs
6affaan-m avatarpython-testingaffaan-m/everything-claude-codepython testing6.6Kskills.sh installs