tdd-cycle

Automates the Red-Green-Refactor cycle with structured commits and PLAN.md integration.

Updated Nov 10, 2025
One-click install
npx skills add https://github.com/SwiftyJunnos/Claude-Code-with-TDD --skill tdd-cycle-swiftyjunnos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-cycle
Source: https://github.com/SwiftyJunnos/Claude-Code-with-TDD/tree/main/.claude/skills/tdd-cycle
Command: npx skills add https://github.com/SwiftyJunnos/Claude-Code-with-TDD --skill tdd-cycle-swiftyjunnos

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the entire Test-Driven Development cycle, ensuring adherence to the Red-Green-Refactor methodology and streamlining the process of writing, implementing, and refining code based on tests.

Core Features & Use Cases

  • Orchestrates TDD Phases: Guides through RED (write failing test), GREEN (make it pass), and REFACTOR (improve structure).
  • Test-Driven Workflow: Ensures new code is always driven by a failing test.
  • Structured Commits: Facilitates separate commits for structural (tidy) and behavioral changes.
  • Use Case: When starting a new feature, use this skill to write the first test, implement the minimal code to pass it, refactor if necessary, and then commit the changes, ensuring a robust and well-tested codebase from the outset.

Quick Start

Execute the tdd-cycle skill to begin implementing the next test from PLAN.md.

Frequently Asked Questions about tdd-cycle

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

FAQPage Schema
How do I automate the Red-Green-Refactor cycle in my development workflow?

You can automate the Test-Driven Development cycle by enforcing the Red-Green-Refactor pattern, which guides you through writing failing tests, implementing minimal code to pass, and refactoring for structure. It streamlines the entire workflow automatically.

What is the best way to separate structural and behavioral commits during refactoring?

The best way to separate structural and behavioral commits is by applying Tidy First principles. This approach facilitates distinct commit strategies, ensuring structural tidying changes are committed separately from behavioral modifications.

How do I sequence test writing for new features using TDD?

You can sequence test writing by integrating with PLAN.md. The automation reads PLAN.md to determine test sequencing, ensuring new code is consistently driven by the next failing test in your planned development cycle.

Does this TDD workflow require any external dependencies or testing frameworks?

No external dependencies are required to run this TDD workflow. It operates independently to orchestrate the Red-Green-Refactor phases and provide guidance on commit strategies without relying on specific testing frameworks.

When should I use Tidy First principles in my development cycle?

You should use Tidy First principles during the refactoring phase of your development cycle. It helps improve code structure before behavioral changes, ensuring a robust and well-tested codebase through disciplined structural commits.

Can I enforce writing failing tests before implementing code automatically?

Yes, you can enforce writing failing tests before implementation through a test-driven workflow. The automation ensures new code is always driven by a failing test first, maintaining strict adherence to the TDD methodology.