tdd

Guide Test-Driven Development with behavior-focused tests and minimal implementation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill unit provides guidance and a structured approach to Test-Driven Development (TDD), addressing the challenge of writing tests before implementation, which can lead to better code quality and maintainability.

Core Features & Use Cases

  • Philosophy of TDD: Offers a detailed explanation of the core principles and the difference between good and bad tests.
  • Anti-Patterns: Alerts developers against common mistakes in TDD, such as horizontal slicing.
  • Workflow: Outlines the steps involved in the TDD process, including planning, writing tracer bullets, incremental loops, and refactoring.
  • Checklist: Provides a checklist for each cycle to ensure that tests are focused on behavior and public interfaces.

Quick Start

Start by reading CONTEXT.md if available, then create a test for a single behavior, write the minimal code to pass it, and refactor when all tests pass.

Frequently Asked Questions about tdd

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

FAQPage Schema
What is test-driven development and how does it improve code quality?

Test-driven development is a structured workflow where you write tests before implementation to ensure behavior-driven design. This approach improves code quality and maintainability by enforcing minimal implementation and continuous refactoring.

How do I start writing tests before implementation using a TDD workflow?

Start by reading your project context, then create a test for a single behavior, write the minimal code required to pass it, and refactor once all tests pass. This structured incremental loop keeps development strictly focused on expected software behavior.

What are common anti-patterns and mistakes to avoid in test-driven development?

A common TDD anti-pattern is horizontal slicing, which incorrectly structures tests around internal implementation details rather than behavior. You should focus tests strictly on public interfaces and expected outcomes to avoid brittle and ineffective software testing.

Do I need prior coding experience to implement test-driven development practices?

Yes, efficiently implementing test-driven development requires an existing understanding of TDD principles and general coding. The provided workflow focuses on behavior-driven testing and refactoring practices rather than teaching foundational programming concepts.

When should I refactor my code during the test-driven development process?

You should refactor during the test-driven development process only after all tests pass. This ensures your refactoring efforts maintain existing behavior while improving code structure, guided by a checklist verifying that tests remain focused on public interfaces.