test-driven-development

Enforces Red-Green-Refactor cycle by blocking writes and edits without prior failing tests.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces the Red-Green-Refactor cycle, ensuring that code is only written after a failing test, and that tests are written before implementation. It prevents code from being written without test coverage.

Core Features & Use Cases

  • Test-First Enforcement: Blocks implementation without a preceding failing test.
  • Red-Green-Refactor Guidance: Guides users through the TDD cycle.
  • Use Case: When developing a new feature, this Skill ensures you write a failing test first, then the minimal code to pass it, and finally refactor while keeping tests green.

Quick Start

Use the test-driven-development skill to enforce the Red-Green-Refactor cycle for all new code development.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I enforce the Red-Green-Refactor cycle when writing code?

To enforce the Red-Green-Refactor cycle, you need a mechanism that blocks implementation until a failing test is written, ensuring code follows test coverage. This approach mandates writing a failing test first, then minimal code to pass it, and finally refactoring while tests stay green.

What is test-driven development and how does it prevent writing code without tests?

Test-driven development is a practice where failing tests must precede implementation, preventing code from being written without test coverage. It enforces the Red-Green-Refactor cycle by blocking write and edit operations until adequate tests are established for features and bug fixes.

How do I stop writing implementation code before establishing test coverage?

You can stop writing implementation code before establishing test coverage by enforcing test-first principles that block write and edit operations. This ensures adequate test coverage is created and verified through a failing test before any feature implementation begins.

Can I use test-driven development for both new features and bug fixes?

Yes, you can use test-driven development for both new features and bug fixes. It enforces adherence to TDD principles across all development by mandating that a failing test precedes any code implementation, ensuring comprehensive coverage regardless of the task type.

What are the limitations of strictly enforcing test-first coding?

A limitation of strictly enforcing test-first coding is that it blocks all write and edit operations without adequate test coverage. This rigid enforcement of the Red-Green-Refactor cycle may slow down rapid prototyping or exploratory coding where immediate test creation is not feasible.

Why does test-driven development require a failing test before implementation?

Test-driven development requires a failing test before implementation to validate that the test actually checks the intended behavior. This Red-Green-Refactor cycle approach ensures code is only written after test coverage is established, preventing untested code from entering the codebase.