tdd

Enforce Red-Green-Refactor sequencing with one failing test per feature.

Updated Feb 20, 2026
One-click install
npx skills add https://github.com/ssccio/cc-on-web-base --skill tdd-ssccio
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/ssccio/cc-on-web-base/tree/main/skills/tdd
Command: npx skills add https://github.com/ssccio/cc-on-web-base --skill tdd-ssccio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of unreliable development workflows where production code gets written before tests, leading to regressions and unclear behavior.

Core Features & Use Cases

  • TDD Enforcement: Forces the order of operations—write a failing test first, then implement just enough code to pass, and only then refactor.
  • Cycle Guidance: Structures every change around the Red-Green-Refactor loop to prevent mixing multiple features into one iteration.
  • Output Formatting: Prompts a consistent report format describing the failing test, minimal implementation, and refactoring results.

Quick Start

Ask the AI to guide you through a Red-Green-Refactor cycle for your next feature and explicitly require the test to fail before any production code is written.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I enforce a tests-first workflow for unit testing?▼

To enforce tests-first development, you must write a failing unit test before any production code. This strict sequencing prevents regressions by ensuring every feature is defined by a failing test initially.

What is the Red-Green-Refactor cycle?▼

The Red-Green-Refactor cycle is a tests-first workflow where you write a failing test, implement minimal code to pass it, then refactor safely. It structures iterative development around one test per feature.

How do I refactor code safely while maintaining a green test suite?▼

To refactor code safely while maintaining a green test suite, you must first ensure your unit tests pass. You can then restructure the production code, running the tests-first workflow to verify no regressions occur.

Why write a failing test before implementing production code?▼

Writing a failing test before production code enforces quality by clarifying behavior upfront. This tests-first approach prevents unreliable workflows where code is written without clear validation criteria.

Can I implement multiple features in one TDD iteration?▼

No, you should not implement multiple features in one TDD iteration. The tests-first workflow requires one test per feature to prevent mixing changes, ensuring minimal implementation until the specific failing test passes.

Does TDD prevent regressions during iterative development?▼

Yes, TDD prevents regressions during iterative development by enforcing a strict Red-Green-Refactor sequence. This tests-first discipline ensures production code is always validated by a previously failing test.