tdd

Guide teams through the RED-GREEN-REFACTOR cycle for Test-Driven Development.

4|Updated Dec 14, 2025
One-click install
npx skills add https://github.com/LukasStrickler/ai-dev-atelier --skill tdd-lukasstrickler
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/LukasStrickler/ai-dev-atelier/tree/main/content/skills/tdd
Command: npx skills add https://github.com/LukasStrickler/ai-dev-atelier --skill tdd-lukasstrickler

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill guides developers to adopt and practice Test-Driven Development, providing a structured, repeatable workflow that makes test-first outcomes the default and reduces debugging time.

Core Features & Use Cases

  • Explore and identify test environments: detect existing tests, frameworks, and setup to establish a green baseline.
  • Mode-based workflow: define whether to pursue New Feature, Bug Fix, Refactor, or Legacy work and provide concrete steps for each.
  • Core TDD loop guide: steps for RED, GREEN, REFACTOR phases, with checklists and best practices.

Quick Start

Start with a concise plan: Inspect the codebase for existing tests, run tests to establish a baseline, then follow the RED-GREEN-REFACTOR loop to add tests and implement minimal code.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I start test-driven development in an existing codebase?

To start test-driven development in an existing codebase, first explore the environment to detect existing tests and frameworks, run tests to establish a green baseline, then follow the RED-GREEN-REFACTOR loop to add new tests and implement minimal code.

What is the red-green-refactor cycle in TDD?

The red-green-refactor cycle in TDD is a core loop where you first write a failing test, implement minimal code to make it pass, and then clean up the design. This structured workflow makes test-first outcomes the default and reduces debugging time.

Does test-driven development work for bug fixes and refactoring legacy code?

Test-driven development supports bug fixes, refactoring, and legacy code through mode-based guidance. It provides concrete steps tailored to each scenario, establishing a structured, repeatable workflow for maintaining robust code across different development tasks.

How do I establish a green baseline before writing new tests?

To establish a green baseline before writing new tests, inspect the codebase for existing tests, identify the active test frameworks, and run the current test suite to ensure all pre-existing tests pass before entering the red-green-refactor loop.

What's the best way to maintain a test-first workflow across a software team?

The best way to maintain a test-first workflow is to automate TDD practices across the codebase using environment exploration checklists and mode selection, ensuring teams consistently apply the RED-GREEN-REFACTOR cycle for new features and refactoring efforts.