tdd-workflow

Automates the Red-Green-Refactor cycle enforcing test-first practice for code changes.

3|Updated Sep 16, 2025
One-click install
npx skills add https://github.com/mkaczkowski/ai-command-library --skill tdd-workflow-mkaczkowski
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/mkaczkowski/ai-command-library/tree/main/plugins/coding/commands/pro-workflow/skills/tdd-workflow
Command: npx skills add https://github.com/mkaczkowski/ai-command-library --skill tdd-workflow-mkaczkowski

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a disciplined workflow that enforces writing tests before production code to prevent regressions and promote clean design.

Core Features & Use Cases

  • Enforces a Red-Green-Refactor cycle to guide feature development.
  • Specifies that tests must be written before implementation and that each test targets a single behavior.
  • Provides guidance with testing patterns and best practices for maintainable codebases.

Quick Start

Write a failing test first, then implement the minimal code to pass it, and finally refactor after tests pass.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
How do I enforce a test-driven development workflow in my project?▼

To enforce a test-driven development workflow, you mandate writing tests before production code. This approach guides teams through strict Red-Green-Refactor cycles to prevent regressions and promote clean design.

What is the Red-Green-Refactor cycle and how does it apply to feature development?▼

The Red-Green-Refactor cycle is a test-driven development process where you write a failing test, implement minimal code to pass it, and then refactor. It guides feature development by ensuring per-test isolation.

How do I start practicing test-first development for new code changes?▼

Start test-first development by writing a failing test that targets a single behavior before any implementation. Then write the minimal production code to pass the test, and finally refactor the codebase.

Can I use this test-driven development workflow for both new features and code changes?▼

Yes, this test-driven development workflow applies across both new feature development and existing code changes. It provides clear guardrails to ensure tests are written before implementation.

Why should I write unit tests before implementation instead of after?▼

Writing unit tests before implementation prevents regressions and promotes maintainable codebases. By focusing on minimal implementations to pass isolated tests, you ensure each test targets a single behavior.

What are the limitations of mandating test-first practices for development?▼

Mandating test-first practices requires strict adherence to writing tests before code and focusing on minimal implementations. This disciplined workflow may slow initial feature velocity but prevents regressions and promotes clean design.