tdd

Guide Red-Green-Refactor cycles with phase-specific templates and success criteria.

Updated May 29, 2021
One-click install
npx skills add https://github.com/hikch/dotfiles --skill tdd-hikch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/hikch/dotfiles/tree/main/.claude/skills/tdd
Command: npx skills add https://github.com/hikch/dotfiles --skill tdd-hikch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Test-driven development (TDD) reduces defects by guiding you to write failing tests before implementation, ensuring functional code aligns with requirements and enabling faster feedback.

Core Features & Use Cases

  • Red-Green-Refactor workflow guidance for small, testable features.
  • Phase-by-phase test design templates and example tests for quick adoption.
  • Language/framework agnostic guidance that fits common test runners and environments.

Quick Start

Define a failing test for a small feature, then implement the minimal code to pass it and refactor for clarity.

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 for a new software feature?

Start test-driven development by defining a failing test for a small feature, then implement the minimal code required to pass it and refactor the code for clarity. The workflow automates phase-specific steps, templates, and example tests for rapid adoption across design, implementation, and refactor phases.

What is the Red-Green-Refactor cycle in test-driven development?

The Red-Green-Refactor cycle in test-driven development is a workflow where you first write a failing test (Red), implement the minimal code to make it pass (Green), and then clean up the code without changing its behavior (Refactor). This reduces defects and ensures functional code aligns with requirements.

Does this TDD workflow guidance work with any test runner or programming language?

Yes, the TDD workflow provides language-agnostic and framework-agnostic guidance designed to fit common test runners and software development environments. It defines concrete inputs, outputs, and success criteria to ensure deterministic evaluation and safe progression regardless of your specific tech stack.

Why should I write failing tests before implementing functional code?

Writing failing tests before implementation is a core test-driven development practice that reduces defects by ensuring functional code aligns with requirements. It enables faster feedback during the software engineering process by guiding you through structured Red-Green-Refactor cycles for small, testable features.

Can I get phase-by-phase test design templates for my software project?

Yes, the workflow provides phase-by-phase test design templates and example tests for quick adoption. These templates guide you through the Red-Green-Refactor cycles across design, implementation, and refactor phases to ensure deterministic evaluation and safe progression in your software project.

What are the limitations of automating test-driven development workflows?

The test-driven development workflow is limited to guiding small, testable features through the Red-Green-Refactor cycle. While it provides language-agnostic guidance and templates, it does not replace the need for a functioning test runner environment and requires users to manually define concrete inputs and success criteria for safe progression.