tdd

Enforce a red-green-refactor test-driven development workflow with unit testing tooling.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/arinbalyan/config --skill tdd-arinbalyan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/arinbalyan/config/tree/main/skills/tdd
Command: npx skills add https://github.com/arinbalyan/config --skill tdd-arinbalyan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Test-driven development (TDD) guides teams to write failing tests before code, ensuring design clarity and early defect detection.

Core Features & Use Cases

  • Red-Green-Refactor cycle: Write a failing test, implement minimal code to pass, and refactor while keeping tests green.
  • Improved design confidence: Tests drive API design and modularization, resulting in cleaner interfaces.
  • Use Case: When adding a new feature, start by writing tests that specify the behavior, then implement the feature to satisfy them.

Quick Start

Use a test runner to define a failing test, then implement the feature to satisfy it.

Frequently Asked Questions about tdd

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) enforces a three-phase red-green-refactor cycle: write a failing test, implement minimal code to pass it, then refactor while keeping tests green. This ensures design clarity and early defect detection.

How do I implement a new feature using test-driven development?

To implement a feature with test-driven development, start by writing tests that specify the desired behavior. Then, write the minimal code required to satisfy those tests, ensuring your API design and modularization are driven by the test specifications.

How does test-driven development improve code quality and design confidence?

Test-driven development improves code quality by driving API design and modularization through tests, resulting in cleaner interfaces. Writing tests before code ensures early defect detection and provides confidence during refactoring.

Do I need a unit testing tool to start writing tests before code?

Yes, you need a test runner to define failing tests when starting test-driven development. The workflow integrates with unit testing tooling to verify that your minimal feature implementation satisfies the specified behavior.

When should I use refactoring in the test-driven development workflow?

Refactoring in test-driven development occurs after your failing test passes with minimal code. You refactor your implementation while keeping the tests green, ensuring verifiable changes and incremental design improvements without breaking functionality.