tdd-workflow

Enforce a RED-GREEN-REFACTOR test-driven development workflow.

42|3|Updated Feb 13, 2026
One-click install
npx skills add https://github.com/pratikrath126/ai-image-detector --skill tdd-workflow-pratikrath126
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/pratikrath126/ai-image-detector/tree/main/.agent/kit-skills/tdd-workflow
Command: npx skills add https://github.com/pratikrath126/ai-image-detector --skill tdd-workflow-pratikrath126

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Establishes a disciplined test-first workflow that reduces defects by guiding teams to write tests before implementation.

Core Features & Use Cases

  • Enforces a deterministic RED-GREEN-REFACTOR cycle for features and bug fixes.
  • Encourages small, testable units and safer refactoring through explicit test ownership.
  • Use Case: a feature is implemented only after a failing test is written and then made to pass.

Quick Start

Start by writing a failing test for the new behavior, then implement the minimal code to pass it, and finally refactor for clarity.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
How does the red-green-refactor cycle work in test-driven development?

Test-driven development enforces a test-first workflow that reduces defects by requiring teams to write tests before implementation. This establishes clear test ownership and safer refactoring practices across software projects.

How do I start writing tests before implementation for a new feature?

To start test-driven development, write a failing test for the new behavior, implement the minimal code required to make the test pass, and then refactor the code for clarity. This formalizes incremental delivery through a deterministic workflow.

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

Yes, this test-driven development workflow enforces a deterministic red-green-refactor cycle that applies to both features and bug fixes. It establishes clear rules for test naming and phase transitions to manage changes safely.

What are the rules for test naming and phase transitions in TDD?

The workflow formalizes a repeatable test-driven development process with clear rules for test naming, phase transitions between red-green-refactor cycles, and incremental delivery. This encourages small, testable units and explicit test ownership.

Why should I refactor code only after the test passes in TDD?

You should refactor code only after the test passes because test-driven development ensures safer refactoring through explicit test ownership. This approach improves code quality and maintains reliable change management across cycles.