test-driven-development

Enforce a red-green-refactor TDD workflow with failing tests before production code.

4|1|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/jordanhindo/Turtlez --skill test-driven-development-jordanhindo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/jordanhindo/Turtlez/tree/main/.claude/skills/test-driven-development
Command: npx skills add https://github.com/jordanhindo/Turtlez --skill test-driven-development-jordanhindo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents fragile implementations and regressions by forcing you to define expected behavior in a failing test before writing production code.

Core Features & Use Cases

  • Test-first implementation: Write a failing test that proves the feature’s intended behavior, then implement only what’s required to make it pass.
  • Strict TDD cycle: Red (watch it fail) → Green (watch it pass) → Refactor (clean up without adding behavior).
  • Anti-pattern guardrails: Avoid testing mock existence, adding test-only methods to production, and over-mocking without understanding dependencies.
  • Behavior documentation: Use tests as living documentation of how the code should behave in real scenarios.
  • Use cases: New features, bug fixes, refactors, and behavior changes—especially when you want confidence that the change doesn’t break existing functionality.

Quick Start

Use this skill when you start work on a feature or bugfix by writing a minimal failing test first, then implementing the smallest amount of production code to make that test pass before refactoring.

Frequently Asked Questions about test-driven-development

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

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

Test-driven development begins by writing a minimal failing test that proves the feature's intended behavior, then implementing only the production code required to make it pass. This enforces a strict red-green-refactor cycle to build reliable software.

What is the red-green-refactor cycle in unit testing?

The red-green-refactor cycle requires watching a test fail, writing code to watch it pass, then refactoring without adding behavior. This enforces test-first development and ensures automated verification of new behavior before implementation.

How do I avoid mocking anti-patterns when writing unit tests?

Avoid mocking anti-patterns by preventing tests that verify mock existence, rejecting test-only methods in production code, and understanding dependencies before over-mocking. This maintains behavior verification and prevents fragile test implementations.

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

Test-driven development applies to bug fixes, refactors, and behavior changes by requiring a failing test that specifies the expected new behavior. This provides deterministic, automated verification that changes do not break existing functionality.

When should I not use test-driven development practices?

Test-driven development is not suitable when deterministic, automated verification is impossible or unnecessary. It is designed for implementing features, bug fixes, and behavior changes where building reliable code requires strict test-first workflows.