test-driven-development

Enforce red-green-refactor cycles by requiring a failing test before code implementation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Test-driven development (TDD) enforces writing tests before production code to surface requirements early and reduce bugs. It helps teams design clearer APIs and supports safer refactoring.

Core Features & Use Cases

  • Red-Green-Refactor cycle: write a failing test, implement minimal code to pass, then refactor for clarity and quality.
  • Test-first discipline across features, bug fixes, and refactors to ensure behavior is verified before changes.
  • Use Case: start with a failing test for a new feature, implement code to pass, then iterate to improve design while keeping tests green.

Quick Start

Start by writing a failing test for the intended behavior, implement the minimal production code to pass the test, 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
How do I implement test-driven development for a new feature?

Test-driven development for a new feature requires writing a failing red test first, implementing minimal production code to pass the test, and then refactoring for clarity while keeping tests green.

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

The red-green-refactor cycle is a testing discipline where you write a failing red test, implement minimal code to turn it green, then refactor the code for quality without breaking the passing test.

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

Test-first development is applicable to bug fixes and refactoring, requiring a failing test that verifies the intended behavior before you implement production code changes.

When do I need to write a failing test before writing production code?

You need to write a failing test before writing production code whenever you are developing features, fixing bugs, refactoring, or changing behavior to ensure changes are validated by automated tests.

Does test-driven development work across modern codebases without specific testing frameworks?

Test-driven development guides red-green-refactor cycles across modern codebases, but it requires underlying automated testing frameworks to execute tests and validate behavior changes.

Why does test-driven development require minimal production code to pass tests?

Test-driven development requires minimal production code to pass tests because this discipline surfaces requirements early, reduces bugs, and ensures you only write code necessary to satisfy the validated behavior.