test-driven-development

Apply a red-green-refactor workflow to write failing tests before code.

9|2|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/hongmaple0820/agent-academy --skill test-driven-development-hongmaple0820
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/hongmaple0820/agent-academy/tree/main/skills/development/test-driven-development
Command: npx skills add https://github.com/hongmaple0820/agent-academy --skill test-driven-development-hongmaple0820

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Test-driven development helps prevent defects by requiring failing tests before implementing code.

Core Features & Use Cases

  • Enforces a red-green-refactor workflow to ensure you only write production code that passes tests.
  • Promotes safer refactoring and clearer requirements capture for feature development, bug fixes, and maintenance tasks.
  • Useful for teams aiming to improve software quality and reduce regression risk.

Quick Start

Run a simple TDD cycle: write a failing test, implement the minimal code to pass, and refactor while preserving green tests.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
What is the red-green-refactor workflow in test-driven development?

The red-green-refactor workflow in test-driven development requires writing a failing test first, implementing minimal production code to pass that test, and then refactoring the code for clarity while keeping the tests green. This cycle prevents defects by ensuring code is always test-covered.

How do I apply test-driven development to bug fixes and refactoring?

To apply test-driven development to bug fixes and refactoring, you start by writing a failing test that captures the bug or verifies the desired behavior. You then implement minimal code changes to make the test pass, and finally refactor for clarity while maintaining green tests.

When should I use test-driven development for feature development?

You should use test-driven development for feature development when you need to capture clearer requirements and reduce regression risk. It is particularly useful for teams aiming to improve software quality by ensuring robust features are built with tests first from the start.

Does test-driven development require any specific testing frameworks or dependencies?

Test-driven development does not require any specific testing frameworks or external dependencies to implement. It is an approach applicable to any software project where you can write unit tests, focusing on the testing best practices rather than specific tooling.

What's the best way to ensure code quality through unit testing?

The best way to ensure code quality through unit testing is to enforce a test-first approach where you write a failing test, implement the minimal code to pass it, and refactor safely. This prevents defects and promotes safer refactoring by maintaining green tests.