tdd

Guide teams through red-green-refactor cycles to validate software behavior with tests.

Updated Sep 16, 2025
One-click install
npx skills add https://github.com/mukles/platejs-markdown-converter --skill tdd-mukles
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/mukles/platejs-markdown-converter/tree/main/.agents/skills/tdd
Command: npx skills add https://github.com/mukles/platejs-markdown-converter --skill tdd-mukles

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guides teams through a test-driven development cycle to validate software behavior with tests, reducing risk during feature work and bug fixes.

Core Features & Use Cases

  • Emphasizes testing through public interfaces and end-to-end behavior, not implementation details.
  • Encourages rapid feedback via red-green-refactor loops and integration tests that support safe refactoring.
  • Supports test-first development to shape design before implementation and improve maintainability.

Quick Start

Propose a small feature, write a failing test for it, then implement the minimal code to pass the test.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I use test-driven development to validate software behavior?

Test-driven development validates software behavior by writing small, observable tests for public APIs first, failing fast, and implementing minimal code to pass each test. This iterative red-green-refactor cycle reduces risk during feature work and bug fixes.

What is the red-green-refactor cycle in test-first development?

The red-green-refactor cycle in test-first development involves writing a failing test, implementing the minimal code required to pass that test, and then refactoring while maintaining guardrails. This enforces rapid feedback and safe code improvements.

How do I write integration tests that support safe refactoring?

Write integration tests that focus on end-to-end behavior and public interfaces rather than internal implementation details. This approach supports safe refactoring by ensuring observable behaviors remain stable while internal code structures evolve.

Does test-driven development work for fixing bugs in existing codebases?

Yes, test-driven development works for bug fixes in existing codebases by applying the test-first cycle. You write a failing test that captures the bug's incorrect behavior, then implement the minimal solution to make the test pass.

When should I avoid testing implementation details in TDD?

You should avoid testing implementation details in TDD when relying on public APIs and integration tests. Emphasizing testing through public interfaces prevents brittle tests and maintains refactoring discipline across iterative cycles.

What's the best way to start a TDD cycle for a new feature?

The best way to start a TDD cycle for a new feature is to propose a small behavior, write a failing test that defines it, and then implement the minimal code necessary to pass the test before refactoring.