test-driven-development

Enforce test-first development with Red-Green-Refactor and Prove-It patterns.

1|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/AskTinNguyen/vesper-team-skills --skill test-driven-development-asktinnguyen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/AskTinNguyen/vesper-team-skills/tree/main/test-driven-development
Command: npx skills add https://github.com/AskTinNguyen/vesper-team-skills --skill test-driven-development-asktinnguyen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reduces bugs and uncertainty by requiring tests before implementation, making behavior visible and regressions preventable.

Core Features & Use Cases

  • Red-Green-Refactor workflow anchors development around a failing test, minimal implementation, and subsequent cleanup.
  • Prove-It pattern ensures bugs are reproduced by tests before applying fixes, guarding against regressions.
  • Test Pyramid guidance provides a balanced mix of unit, integration, and end-to-end tests for fast, reliable feedback.

Quick Start

Write a failing test for the target behavior, implement the minimal code to pass, and then refactor for clarity.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
What is test-driven development and how does it prove code correctness?

Test-driven development proves code correctness by enforcing a test-first workflow to catch regressions early. You write failing tests first, implement minimal code to pass, then refactor, making behavior visible and preventing future regressions.

How do I use the Red-Green-Refactor workflow for feature development?

To use Red-Green-Refactor for feature development, write a failing test for the target behavior, implement the minimal code required to make that test pass, and then refactor the codebase for clarity while ensuring tests remain green.

How do I reproduce bugs with tests before applying fixes?

You reproduce bugs with tests by applying the Prove-It pattern, which requires writing a failing test that captures the exact buggy behavior before applying any fix. This guards against regressions by validating expected behavior upfront.

Does test-driven development work for complex refactoring tasks?

Test-driven development is highly applicable to complex refactors because it requires behavior to be validated with tests before changes are committed. This ensures existing functionality remains intact while you restructure the code.

What is the test pyramid and how does it guide software testing?

The test pyramid guides software testing by providing a balanced mix of unit, integration, and end-to-end tests. This structure delivers fast, reliable feedback during test-driven development while validating behavior across different application layers.

When should I not use a test-first development approach?

You should avoid test-first development when dealing with exploratory spikes or throwaway prototypes where validating long-term behavior is unnecessary. It requires a structured approach, so applying it to unstable, rapidly changing concepts adds friction.