test-driven-development

Enforce a test-first workflow using the Red-Green-Refactor cycle.

3|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/mor-duongmh/morkit-plugin --skill test-driven-development-mor-duongmh
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/mor-duongmh/morkit-plugin/tree/main/plugins/morkit/skills/test-driven-development
Command: npx skills add https://github.com/mor-duongmh/morkit-plugin --skill test-driven-development-mor-duongmh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Test-driven development helps teams prevent defect risk by forcing tests to fail first and guiding design before implementing code.

Core Features & Use Cases

  • Red-Green-Refactor workflow to iteratively design, verify, and improve code.
  • Mandatory failing-test first approach to guard against regressions and ensure correct behavior.
  • Clear guidance for starting tests before production code during new features, bug fixes, and refactors.

Quick Start

Write a failing test that expresses the desired behavior, then implement the minimal code to pass the test.

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 helps prevent defect risk by forcing tests to fail first and guiding design before implementing code. It requires a failing test before production code to guard against regressions and ensure correct behavior.

How do I start writing unit tests before implementing production code?▼

To start test-driven development, write a failing unit test that expresses the desired behavior, then implement the minimal production code required to pass the test. This mandatory failing-test approach prevents regressions and ensures maintainable code.

When should I use test-driven development for bug fixes and refactoring?▼

Use test-driven development whenever creating new functionality, fixing bugs, or refactoring software projects. It enforces a test-first workflow that verifies tests reflect real behavior, ensuring robust behavior and preventing regressions during code modifications.

Does test-driven development work without any external testing frameworks or dependencies?▼

Test-driven development requires no external dependencies to enforce its workflow. It operates by mandating failing tests first and guiding the red-green-refactor cycle, ensuring software quality assurance through unit tests without relying on specific external libraries.

What is the best way to prevent defect risk when creating new software features?▼

The best way to prevent defect risk is test-driven development, which forces tests to fail first and guides design before implementing code. By requiring a failing test before production code, it guards against regressions and ensures robust behavior.