tdd-workflow

Implement a Test-Driven Development workflow using the RED-GREEN-REFACTOR cycle.

Updated Mar 8, 2026
One-click install
npx skills add https://github.com/roger8b/slideflow --skill tdd-workflow-roger8b
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/roger8b/slideflow/tree/main/.agent/skills/tdd-workflow
Command: npx skills add https://github.com/roger8b/slideflow --skill tdd-workflow-roger8b

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill unit helps you implement a Test-Driven Development (TDD) workflow, ensuring your code is thoroughly tested and maintainable.

Core Features & Use Cases

  • RED-GREEN-REFACTOR Cycle: Offers an actionable guide to writing tests first, followed by minimal code implementation, and finally refactoring.
  • Three Laws of TDD: Establishes best practices for TDD, including writing failing tests before production code.
  • TDD Phases: Breaks down the TDD process into the RED, GREEN, and REFACTOR phases with detailed instructions.
  • AAA Pattern: Introduces the Arrange-Act-Assert testing pattern for structured testing.

Quick Start

Implement the tdd-workflow skill in your project to introduce TDD principles into your development process.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
What is the RED-GREEN-REFACTOR cycle in Test-Driven Development?

The RED-GREEN-REFACTOR cycle in Test-Driven Development involves writing a failing test first, implementing the minimal code to pass that test, and then refactoring the code for quality. This workflow ensures software is thoroughly tested and maintainable from the start.

How do I start implementing a TDD workflow in my software development process?

To start implementing a TDD workflow, follow the Three Laws of TDD by writing failing tests before any production code. Apply the RED, GREEN, and REFACTOR phases sequentially to guide your development and ensure high-quality, well-tested code output.

What is the AAA testing pattern and how does it structure tests?

The AAA testing pattern structures tests into Arrange, Act, and Assert stages. This pattern organizes test setup, execution, and verification, providing a clear framework for writing effective and maintainable tests within your Test-Driven Development workflow.

Do I need external testing frameworks or dependencies to practice TDD?

No external dependencies are required to practice this Test-Driven Development workflow. The guidelines focus on universal TDD principles like the RED-GREEN-REFACTOR cycle and AAA pattern, making them applicable across any software development environment or testing framework.

What are the Three Laws of TDD for writing production code?

The Three Laws of TDD establish best practices requiring developers to write failing tests before writing production code. These laws enforce the test-first approach, ensuring every piece of functionality is defined by and verified against a test.

When should I use Test-Driven Development for writing code?

You should use Test-Driven Development when aiming to write high-quality, robust, and maintainable software. It is particularly effective when you need structured testing guidelines and want to ensure every code implementation is immediately verified against failing tests.