test-driven-development

Enforce the Red-Green-Refactor cycle for feature implementation and bug fixing.

2|Updated May 27, 2026
One-click install
npx skills add https://github.com/edlng/agents --skill test-driven-development-edlng
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/edlng/agents/tree/main/skills/universal/test-driven-development
Command: npx skills add https://github.com/edlng/agents --skill test-driven-development-edlng

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill eliminates the technical debt and uncertainty associated with writing code before verifying requirements, ensuring that every feature is backed by a failing test that proves its necessity.

Core Features & Use Cases

  • Red-Green-Refactor Cycle: Provides a structured, mandatory workflow to ensure production code is only written to satisfy a failing test.
  • Regression Prevention: Establishes a systematic testing harness that catches bugs early and prevents future regressions.
  • Use Case: When implementing a complex retry mechanism for a network request, this skill guides you to write the failure case first, ensuring the implementation is minimal and correct.

Quick Start

Use the test-driven-development skill to guide the implementation of the new user authentication module by starting with a failing test case.

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 cycle in test-driven development?

The Red-Green-Refactor cycle in test-driven development is a strict workflow requiring a failing test, writing minimal production code to pass it, and then refactoring. This enforces high code reliability and prevents technical debt.

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

To implement a feature using test-driven development, start by writing a failing unit test that proves the feature's necessity. Then write minimal production code to satisfy the test, ensuring regression prevention and correct implementation.

Why does test-driven development prohibit writing production code before tests?

Test-driven development prohibits writing production code before tests to eliminate uncertainty and technical debt. Mandating a preceding failing test ensures every feature is backed by proof of necessity and maintains a systematic testing harness.

Can I use test-driven development for fixing bugs in existing software?

Yes, you can use test-driven development for bug fixing. The methodology applies to all software development tasks requiring high reliability by enforcing the Red-Green-Refactor cycle to catch bugs early and prevent future regressions.

When do I need to use test-driven development for software engineering?

You need test-driven development for software engineering tasks demanding high code reliability and minimal technical debt. It is essential when implementing complex mechanisms, like network retries, where establishing a systematic testing harness prevents future regressions.

Does test-driven development work for complex network retry mechanisms?

Yes, test-driven development works for complex network retry mechanisms by guiding you to write the failure case first. This ensures the implementation is minimal, correct, and backed by a systematic testing harness that prevents regressions.