tdd

Guide users through red-green-refactor cycles for test-driven development.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/Jkker/react-template --skill tdd-jkker
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/Jkker/react-template/tree/main/.agents/skills/tdd
Command: npx skills add https://github.com/Jkker/react-template --skill tdd-jkker

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Test-driven development (TDD) helps teams ensure software behavior through public interfaces, reducing coupling to internal implementations and enabling safer refactors.

Core Features & Use Cases

  • Red-Green-Refactor loop drives feature development and bug fixes via small, test-first iterations.
  • Integration testing validates end-to-end behavior using public APIs.
  • Vertical slices & planning guide incremental delivery and minimize waste in development cycles.
  • Real-world scenarios include adding a feature, fixing a bug, or refactoring with confidence while maintaining verifiable behavior.

Quick Start

Write a failing test for a new feature, implement just enough code to pass, and refactor for clarity.

Frequently Asked Questions about tdd

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

FAQPage Schema
What is the red-green-refactor cycle in test-driven development?

Test-driven development uses the red-green-refactor loop to drive feature creation and bug fixes through small iterations. You write a failing test, implement just enough code to pass, and then refactor safely while maintaining verifiable behavior.

How do I write integration tests using public interfaces?

Writing integration tests using public interfaces validates end-to-end behavior while reducing coupling to internal implementations. This approach enables safer refactoring by focusing on external APIs rather than internal code structures during test execution.

How do I plan feature development using vertical slices?

Planning feature development using vertical slices guides incremental delivery by breaking features into complete, end-to-end functional units. This minimizes waste in development cycles by ensuring each slice delivers testable, verifiable behavior through public APIs.

Does test-driven development work for fixing existing bugs?

Test-driven development works for fixing bugs by first writing a failing test that reproduces the bug, then implementing the fix to make it pass. This ensures the bug is verifiably resolved and prevents regressions through safe refactoring.

What are common TDD anti-patterns to avoid during refactoring?

Common TDD anti-patterns include skipping the planning phase, testing internal implementations instead of public interfaces, and refactoring without verifiable behavior. The workflow enforces planning steps and tracer bullet techniques to highlight and prevent these anti-patterns.

Can I use TDD for end-to-end integration testing?

TDD supports end-to-end integration testing by validating behavior through public APIs and vertical slices. This approach ensures complete feature flows work correctly while maintaining the ability to refactor safely without breaking verifiable behavior.