
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-codeInstalls 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- Context Engineering71.1K
- Incremental Implementation71K
- Git Workflow And Versioning68.8K
- Idea Refine68.3K
- Using Agent Skills68K
- Browser Testing With Devtools67.7K
- Shipping And Launch67.4K
- Source Driven Development67.4K
- Ci Cd And Automation67.3K
- Interview Me66.4K
- Deprecation And Migration66.4K
- Doubt Driven Development65.8K
- Observability And Instrumentation63.8K
- Constraint Driven Development42.4K
- Code Review And Quality84.1K
- Security And Hardening81.4K
- Frontend Ui Engineering77.8K
- Performance Optimization75.2K
- Spec Driven Development74.7K
- Planning And Task Breakdown73.5K
- Documentation And Adrs73.5K
- Code Simplification72.6K
- Api And Interface Design72.4K
- Debugging And Error Recovery72.4K