test-driven-development

Guide developers through the Red-Green-Refactor cycle with test-first principles.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces the Test-Driven Development (TDD) methodology to ensure code quality, prevent regressions, and improve design by requiring tests to be written before implementation code.

Core Features & Use Cases

  • Enforces Test-First Principle: Guarantees that no production code is written without a preceding failing test.
  • Guides Red-Green-Refactor Cycle: Provides a clear methodology for writing tests, implementing minimal code, and refactoring.
  • Use Case: When starting any new feature or bug fix, use this Skill to guide you through writing a failing test, making the test pass with minimal code, and then cleaning up the implementation, ensuring robust and well-tested code from the outset.

Quick Start

Follow the Test-Driven Development process by writing a failing test before writing any implementation code.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
What is the test-driven development process for writing new code?

The test-driven development process requires writing a failing test before any implementation, adding minimal code to pass the test, and refactoring only after the test is green. This Red-Green-Refactor cycle prevents regressions and improves maintainability.

How do I start writing code using test-driven development?

To start writing code using test-driven development, write a failing test for your new feature or bug fix first. Then implement the minimum production code required to make that test pass, and finally refactor the implementation while ensuring tests remain green.

Why should I write tests before implementation code?

Writing tests before implementation code enforces the test-first principle, which improves software design, prevents regressions, and ensures code quality. It guarantees that all production code is validated by a failing test from the outset.

Can I use test-driven development for fixing bugs in agile workflows?

Test-driven development is ideal for fixing bugs in agile workflows. You start by writing a failing test that reproduces the bug, then write minimal code to make the test pass, ensuring the regression is fixed and validated before moving forward.

When should I refactor code during the test-driven development cycle?

You should refactor code during the Refactor phase of the test-driven development cycle, which occurs only after your tests are green. This ensures you can safely clean up the implementation without introducing regressions or breaking existing functionality.