test-driven-development

Enforce a test-first workflow with failing automated tests before implementation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enforces a test-first workflow to prevent regressions, clarify intended behavior, and reduce technical debt by ensuring every production change is specified by a failing automated test before implementation.

Core Features & Use Cases

  • Enforces the Red-Green-Refactor cycle and mandates watching tests fail before writing production code.
  • Guides writing minimal, focused tests, verifying expected failures, implementing minimal code to pass, and refactoring while keeping tests green.
  • Use cases: new feature development, bug fixes, refactoring, behavior changes, and improving confidence when modifying existing code.

Quick Start

Write a failing automated test that demonstrates the desired behavior, run the test to confirm the expected failure, implement the minimal code to make it pass, and keep the test in the suite.

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 the red-green-refactor cycle work?

Test-driven development (TDD) is a test-first workflow enforcing the red-green-refactor cycle: write a minimal failing automated test, implement minimal code to pass it, then refactor while keeping tests green to prevent regressions.

How do I write unit tests first when developing a new feature?

To write unit tests first for a new feature, define the desired behavior with a minimal failing automated test, run the suite to confirm the expected failure, implement the minimal production code to pass, and preserve tests during refactoring.

When should I use a test-first approach for bug fixes and refactoring?

Use a test-first approach for bug fixes, refactoring, and behavior changes to clarify intended outcomes and reduce technical debt by ensuring every production change is specified by a failing automated test before implementation.

Do I need to watch my unit tests fail before writing implementation code?

Yes, watching unit tests fail before writing implementation code is mandated by the test-driven development workflow to verify the test actually validates the specified behavior and prevents false positives.

What problem does writing tests before implementation solve?

Writing tests before implementation prevents regressions, clarifies intended behavior, and reduces technical debt by ensuring every production change is specified by a failing automated test.

Can I use test-driven development for modifying existing code behavior?

Yes, you can use test-driven development for modifying existing code behavior by writing a failing automated test that demonstrates the desired new outcome before changing the production code.