tdd-workflow

Codify a RED-GREEN-REFACTOR workflow for Test-Driven Development.

Updated Jan 24, 2026
One-click install
npx skills add https://github.com/lehoangphuc747/anki-lms-demo --skill tdd-workflow-lehoangphuc747
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/lehoangphuc747/anki-lms-demo/tree/main/.agent/skills/tdd-workflow
Command: npx skills add https://github.com/lehoangphuc747/anki-lms-demo --skill tdd-workflow-lehoangphuc747

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps development teams adopt Test-Driven Development by providing a structured, repeatable RED-GREEN-REFACTOR workflow that makes testing an integral part of coding.

Core Features & Use Cases

  • Clear guidance on when to write tests and how to progress from red failing tests to green passing code and subsequent refactoring.
  • Rules and patterns to improve test quality, including one assertion per test, and aligned behavior-oriented naming.
  • Applicability across feature development, bug fixes, and exploratory work to maintain code quality.

Quick Start

Start by writing a failing test that captures the desired behavior, then implement the minimum code to pass it, and finally refactor for readability and maintainability.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
How do I implement test-driven development using the red-green-refactor cycle?

Test-driven development follows the red-green-refactor cycle by writing a failing test first, implementing minimal production code to pass it, and refactoring for readability. This skill codifies that workflow into structured phases for disciplined testing.

What are the core rules for maintaining quality during TDD?

Core TDD rules include writing tests before production code, maintaining one assertion per test, and keeping changes small. These practices ensure reliable, maintainable software by enforcing incremental progress and explicit testing standards.

Can I apply the TDD workflow to bug fixes and exploratory work?

The TDD workflow applies across feature development, bug fixes, and exploratory work. It guides test-first practice in each scenario, ensuring minimal production code and incremental refactoring regardless of the task type.

What's the best way to start writing tests first in an agile workflow?

Starting test-first in an agile workflow requires writing a failing test that captures desired behavior, then implementing the minimum code to pass it, and finally refactoring. This skill provides repeatable phase-based guidance to ensure consistent execution.

Why does my test-driven development workflow break down during refactoring?

TDD workflows break down during refactoring when changes are too large or tests lack behavior-oriented naming. This skill prevents breakdown by enforcing small changes, one assertion per test, and clear phase transitions between green and refactor.