test-driven-development

Enforce a test-first workflow with failing tests before implementation.

Updated Nov 3, 2025
One-click install
npx skills add https://github.com/ablassejr/dotfiles --skill test-driven-development-ablassejr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/ablassejr/dotfiles/tree/main/dot_claude/skills/private_tdd
Command: npx skills add https://github.com/ablassejr/dotfiles --skill test-driven-development-ablassejr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams avoid regressions and wasted effort by enforcing a test-first approach: write a failing test before implementing any feature.

Core Features & Use Cases

  • Red-Green-Refactor cycle to drive safe, incremental development.
  • Clear guidance on when to apply TDD: new features, bug fixes, refactors, and behavior changes.
  • Emphasizes minimal, verifiable code and fast feedback through automated tests.

Quick Start

Start by writing a failing test for a small feature, then implement the minimal code to pass.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I implement test-driven development for new features?

Test-driven development is a test-first workflow enforcing the Red-Green-Refactor cycle. You write a failing test, implement minimal code to pass it, and refactor. This applies to features, bug fixes, and behavior changes.

What is the Red-Green-Refactor cycle in unit testing?

The Red-Green-Refactor cycle in unit testing mandates writing a failing test first (Red), writing minimal code to make it pass (Green), and improving the code without changing behavior (Refactor). This cycle drives safe, incremental development with fast feedback.

When should I apply a test-first development workflow?

Apply a test-first development workflow when building new features, fixing bugs, refactoring, or changing behavior. This approach ensures minimal, verifiable code changes and fail-fast feedback, preventing regressions and wasted effort across projects.

Does test-driven development work for refactoring existing code?

Test-driven development works effectively for refactoring existing code by ensuring clear fail-fast feedback. By writing tests before altering behavior, teams achieve minimal, verifiable code changes that maintain software quality assurance and prevent regressions.

How does writing tests before coding prevent regressions?

Writing tests before coding prevents regressions by establishing a verifiable baseline before implementation. This test-first approach requires minimal code changes guided by automated tests, ensuring fail-fast feedback and protecting against wasted effort.

Can I use test-first development for bug fixes?

You can use test-first development for bug fixes by writing a failing test that reproduces the bug before implementing the fix. This disciplined workflow ensures the specific behavior change is verifiable and prevents future regressions.