test-driven-development

Guide developers in applying test-driven development with red-green-refactor and the Prove-It pattern.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/hodinhtuankiet/screening-resume-recruitment --skill test-driven-development-hodinhtuankiet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/hodinhtuankiet/screening-resume-recruitment/tree/main/.claude/skills/test-driven-development
Command: npx skills add https://github.com/hodinhtuankiet/screening-resume-recruitment --skill test-driven-development-hodinhtuankiet

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Write a failing test before writing the code that makes the code 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.

Core Features & Use Cases

  • The Prove-It Pattern: When a bug report arrives, write a test that reproduces it before implementing the fix.
  • The Test Pyramid: Emphasizes unit tests as the foundation, then integration and end-to-end tests to safeguard behavior.
  • One Assertion Per Concept: Encourages focused tests that verify single behaviors to prevent brittle suites.

Quick Start

Start by writing a failing test that reproduces the required behavior, then implement the minimal code to make it pass.

Frequently Asked Questions about test-driven-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix bugs using test-driven development?

Bug fixes using test-driven development require writing a failing test that reproduces the reported bug before implementing the actual fix. This approach, known as the Prove-It pattern, ensures the bug is accurately captured and prevents regressions when the code is corrected.

What is the red-green-refactor cycle in unit testing?

The red-green-refactor cycle is a core test-driven development workflow where you write a failing test, implement minimal code to pass the test, and then refactor the code while keeping tests green to ensure specifications are met.

How do I structure a test suite for software testing?

Structure a software testing suite using the test pyramid model, prioritizing a strong foundation of unit tests, followed by integration and end-to-end tests. This ensures focused verification of single behaviors and safeguards broader system functionality.

Why should I write tests before implementation code?

Writing tests before implementation proves that the code meets specifications and prevents assumptions. A codebase with tests acts as a superpower for AI agents and developers, while untested code remains a liability that cannot guarantee correctness.

How do I write focused unit tests that prevent brittle suites?

Prevent brittle unit testing suites by maintaining one assertion per concept. This test-driven development pattern encourages focused tests that verify single behaviors, reducing fragility and making software testing outcomes more reliable.