tdd

Guide developers through red-green-refactor loops for features and bug fixes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides teams to adopt test-driven development practices, helping them verify behavior through public interfaces rather than implementation details, and enabling safer, faster iterations.

Core Features & Use Cases

  • Red-Green-Refactor Loop: Promote small, test-first cycles to drive feature work and bug fixes.
  • Integration-Focused Tests: Encourage integration-style tests that validate end-to-end behavior.
  • Refactor Safely: Emphasize maintaining behavior while evolving code structure through refactoring.

Quick Start

Start by writing a small failing test that captures the desired behavior, then implement only enough code to make that test pass.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I implement features and fix bugs using test-driven development?

Test-driven development guides you through a red-green-refactor loop by starting with a small failing test that captures the desired behavior, then implementing only enough code to make it pass before refactoring safely.

What is the red-green-refactor loop in test-driven development?

The red-green-refactor loop is a test-driven development workflow where you write a failing test, write the minimum code to make it pass, and then refactor the code structure while maintaining the confirmed behavior.

Does test-driven development work with integration-style tests?

Yes, test-driven development pairs with integration-style tests to verify behavior end-to-end through public interfaces, confirming that the entire system behavior works correctly rather than testing isolated implementation details.

What's the best way to verify end-to-end behavior during feature development?

The best way to verify end-to-end behavior during feature development is prioritizing integration-style tests through public interfaces, which validate complete system behavior safely and enable faster iterations without coupling to implementation details.

Why should I test through public interfaces instead of implementation details?

Testing through public interfaces instead of implementation details enables safer and faster iterations by verifying behavior end-to-end, allowing you to refactor code structure freely without breaking tests that rely on internal logic.

When do I need test-driven development for bug fixes?

You need test-driven development for bug fixes when you want to capture the desired behavior in a failing test first, ensuring the bug is resolved end-to-end through integration-style tests while preventing future regressions during refactoring.