tdd

Apply the RED-GREEN-REFACTOR cycle to software development tasks.

25|2|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/yimwoo/hotl-plugin --skill tdd-yimwoo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/yimwoo/hotl-plugin/tree/main/skills/tdd
Command: npx skills add https://github.com/yimwoo/hotl-plugin --skill tdd-yimwoo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TDD guides developers to write tests before implementation, ensuring quick feedback, better design, and safer refactoring.

Core Features & Use Cases

  • Guides the RED-GREEN-REFACTOR cycle with explicit steps from failing tests to refactoring.
  • Encourages small, verifiable commits and clear test coverage for unit and integration code.
  • Useful in any software project aiming to improve reliability and maintainability through test-first development.

Quick Start

Start by writing a failing test for a small feature, then implement just enough code to make it pass.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I start the test-driven development workflow for a new feature?

To start test-driven development, write a failing unit test for a small feature, validate the failure, implement minimal code to pass it, refactor, and commit. This enforces the RED-GREEN-REFACTOR cycle for robust software.

What is the RED-GREEN-REFACTOR cycle in unit testing?

The RED-GREEN-REFACTOR cycle in unit testing is writing a failing test, implementing minimal code to make it pass, and refactoring the implementation. This test-first approach ensures quick feedback and safer code modifications.

Does test-driven development work for both unit and integration testing?

Yes, test-driven development works for both unit and integration testing workflows. It coordinates failing tests, incremental code changes, and refactoring guidance across typical software project scopes to improve reliability.

Why should I write failing tests before implementing code?

You should write failing tests before implementation to ensure quick feedback, better software design, and safer refactoring. This test-first approach provides clear test coverage and encourages small, verifiable commits.

What's the best way to maintain code quality during refactoring?

The best way to maintain code quality during refactoring is to follow the test-driven development cycle, ensuring you run tests after implementing minimal code changes. This secures reliability and maintainability.

When should I not use the TDD workflow?

You should reconsider the TDD workflow if your software development task requires rapid prototyping without verifiable commits or clear test coverage, as it strictly enforces incremental code changes and continuous test validation.