tdd

Guide test-driven development with red-green-refactor loops and behavior-focused integration tests.

357|29|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/brianlovin/agent-config --skill tdd-brianlovin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/brianlovin/agent-config/tree/main/skills/tdd
Command: npx skills add https://github.com/brianlovin/agent-config --skill tdd-brianlovin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill guides users through the Test-Driven Development (TDD) process, ensuring software is built with a focus on verifiable behavior and maintainability.

Core Features & Use Cases

  • Red-Green-Refactor Loop: Implements the core TDD cycle for building features and fixing bugs.
  • Behavior-Driven Testing: Emphasizes testing observable behavior through public interfaces, not implementation details.
  • Use Case: When developing a new user authentication module, use this Skill to write tests for login, logout, and password reset before writing the actual code, ensuring each piece functions as expected.

Quick Start

Follow the test-driven development process to build the new user profile feature.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I implement test-driven development for a new software feature?

Test-driven development is implemented through the red-green-refactor loop, starting with writing integration-style tests for observable behavior before writing the actual code, then incrementally building until tests pass, and refactoring safely. This methodology ensures software is built with verifiable behavior and maintainability.

What is the best way to write tests that verify observable behavior instead of implementation details?

Testing observable behavior involves writing integration-style tests that interact exclusively with public interfaces. This behavior-driven testing approach avoids brittle implementation-detail tests by focusing on what the software does from the outside, ensuring refactoring remains safe without breaking existing test suites.

When do I need the red-green-refactor methodology in my development process?

The red-green-refactor methodology is needed when developing new features or fixing bugs to ensure software maintainability. By guiding development through planning, tracer bullets, and incremental loops, it builds confidence that each piece functions as expected before moving forward.

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

Test-driven development works for fixing bugs by applying the red-green-refactor loop to write failing tests that reproduce the defect. This process verifies the observable behavior through public interfaces, ensuring the fix resolves the issue without introducing brittle implementation-detail tests.

Why does my test suite break frequently during code refactoring?

Test suites break during code refactoring when tests are tightly coupled to implementation details rather than observable behavior. By shifting to integration-style tests that verify public interfaces, you avoid brittle tests and ensure refactoring remains safe and maintainable.