test-driven-development

Enforce a Red-Green-Refactor cycle by writing failing tests before production code.

Updated Jan 12, 2026
One-click install
npx skills add https://github.com/giosuetedeschi-spec/bobu-website --skill test-driven-development-giosuetedeschi-spec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/giosuetedeschi-spec/bobu-website/tree/main/.claude/skills/test-driven-development
Command: npx skills add https://github.com/giosuetedeschi-spec/bobu-website --skill test-driven-development-giosuetedeschi-spec

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill eliminates technical debt and unreliable code by enforcing a strict Red-Green-Refactor cycle, ensuring that every feature is verified by a failing test before implementation.

Core Features & Use Cases

  • Red-Green-Refactor Enforcement: Guides the user through the mandatory cycle of writing a failing test, implementing minimal code, and refactoring.
  • Anti-Pattern Detection: Provides guardrails against common testing mistakes like mocking behavior instead of real logic or adding test-only methods to production code.
  • Use Case: When implementing a new API endpoint, use this skill to define the expected behavior in a test file first, ensuring the implementation is driven by requirements rather than assumptions.

Quick Start

Activate the test-driven-development skill to begin implementing a new feature by writing a failing test case first.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I enforce test-driven development when implementing new features?

To enforce test-driven development, you must follow a strict Red-Green-Refactor cycle. This means writing a failing test first, implementing minimal code to pass it, and then refactoring. This prevents technical debt and ensures code quality from the start.

Why does test-driven development require a failing test before implementation?

Test-driven development requires a failing test first to verify that the test actually checks the intended behavior. This ensures production code is driven by requirements rather than assumptions, satisfying high code quality and regression prevention standards.

Can I use this test-driven development approach for bug fixes and refactoring?

Yes, this test-driven development approach applies to all feature development, bug fixes, and refactoring tasks within the software development lifecycle. It enforces behavior-driven design through systematic verification for every code change.

What are the best practices to avoid common TDD anti-patterns?

To avoid TDD anti-patterns, you should stop mocking behavior instead of real logic and avoid adding test-only methods to production code. Following a strict Red-Green-Refactor cycle provides guardrails against these common testing mistakes.

How do I start writing a failing test for a new API endpoint?

To start writing a failing test for a new API endpoint, activate the test-driven development process and define the expected behavior in a test file first. This ensures the implementation is driven by requirements before any production code is written.