test-driven-development

Plan and implement features by writing failing tests first with Red-Green-Refactor.

1|Updated Apr 17, 2026
One-click install
npx skills add https://github.com/esneiderbravo/hackaton --skill test-driven-development-esneiderbravo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/esneiderbravo/hackaton/tree/main/.github/skills/test-driven-development
Command: npx skills add https://github.com/esneiderbravo/hackaton --skill test-driven-development-esneiderbravo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TDD helps teams ensure code quality by requiring a test that fails before implementation, guiding design and preventing regressions.

Core Features & Use Cases

  • Red-Green-Refactor workflow that systematically validates behavior through tests.
  • Tests-first discipline for features, bug fixes, and refactors to ensure correctness.
  • Clear guidance on when to apply TDD in real projects with examples.

Quick Start

Run a failing test, then implement the minimal code to pass, and refactor while keeping all tests green.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I implement test-driven development for new software features?

Test-driven development is implemented by writing a failing test first, then adding minimal production code to pass it, and refactoring while keeping all tests green. This Red-Green-Refactor cycle systematically validates behavior and ensures correctness.

What is the Red-Green-Refactor cycle in TDD?

The Red-Green-Refactor cycle is a test-first discipline where you write a failing test, implement the minimal code to make it pass, and then refactor. It enforces deterministic progress and prohibits production code without tests.

Can I use test-first development for bug fixes and refactoring?

Yes, test-first development applies to bug fixes and refactors across any codebase. It requires writing a failing test that reproduces the bug before implementation, ensuring deterministic progress and preventing regressions.

Does TDD require using mocks for testing production code?

No, this test-driven development approach requires minimal, real tests over mocks to drive correct software design. It prohibits production code without tests and uses real tests to ensure test coverage.

When should I not use test-driven development for software design?

You should not use test-driven development when you cannot write deterministic tests or when the software design lacks clear behavior to validate. It enforces a strict Red-Green-Refactor workflow that requires failing tests before implementation.