test-driven-development

Enforce a red-green-refactor cycle with failing tests before production code.

15|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/mahoushoujyo-eee/eshell --skill test-driven-development-mahoushoujyo-eee
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/mahoushoujyo-eee/eshell/tree/main/.codex/skills/test-driven-development
Command: npx skills add https://github.com/mahoushoujyo-eee/eshell --skill test-driven-development-mahoushoujyo-eee

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents unverified production code, regressions, and incomplete fixes by requiring behavior to be specified and proven through failing tests before implementation.

Core Features & Use Cases

  • Red-Green-Refactor Workflow: Write a focused failing test, implement the minimum behavior required to pass it, then refactor while preserving green tests.
  • Strict Verification: Confirm that tests fail for the expected reason before implementation and pass cleanly afterward, including regression checks.
  • Safety and Quality Guardrails: Avoid test-after workflows, unnecessary mocks, test-only production methods, incomplete test doubles, and untested bug fixes.
  • Use Case: When adding retry logic or fixing validation behavior, first create a test that demonstrates the desired outcome, verify the failure, implement the smallest fix, and run the full relevant test suite.

Quick Start

Use the test-driven-development skill to implement the requested feature by writing and running a failing test first, adding minimal code to pass it, and refactoring only after all tests are green.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I start writing code using test-driven development?

Test-driven development requires writing a focused failing test, implementing the minimum behavior to pass it, and refactoring while preserving green tests. This enforces strict test-first discipline before any production code is written.

What is the red-green-refactor cycle in software engineering?

The red-green-refactor cycle is a test-driven development workflow where you write a failing test, add minimal code to pass it, then refactor safely. It ensures behavior is specified and proven through failing tests before implementation.

How do I prevent regressions when fixing bugs or refactoring?

Prevent regressions by creating a test that demonstrates the desired outcome, verifying the failure for the expected reason, implementing the smallest fix, and running the full relevant test suite to confirm clean passes.

Why does test-first development require confirming expected test failures?

Test-first development requires confirming expected failures to ensure the test validates the correct behavior before implementation. This prevents unverified production code and incomplete fixes by proving the test fails for the right reason.

What are the limitations of test-first development workflows?

Test-first development workflows should avoid test-after practices, unnecessary mocks, and test-only production methods. Limitations include the requirement for disciplined mocking and strict adherence to minimal implementations to maintain safety guardrails.

Can I use test-driven development for unit testing and integration testing?

Test-driven development applies to software engineering workflows involving unit tests, integration tests, regression testing, debugging, and implementation verification, ensuring behavior is validated before production code is written.