test-driven-development

Enforces test-first development by writing failing tests before production code.

1|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/greglamb/macos-name-tag-app --skill test-driven-development-greglamb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/greglamb/macos-name-tag-app/tree/main/.claude/skills/test-driven-development
Command: npx skills add https://github.com/greglamb/macos-name-tag-app --skill test-driven-development-greglamb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents unverified production changes by requiring behavior to be defined and validated through failing tests before implementation begins.

Core Features & Use Cases

  • Red-Green-Refactor Workflow: Write a focused failing test, implement the minimum code needed to pass it, verify the full suite, and then refactor safely.
  • Behavior-Focused Testing: Encourage clear, minimal tests that exercise real behavior rather than implementation details or mock behavior.
  • Use Case: When fixing a bug or adding a feature, use this Skill to reproduce the expected behavior with a failing test, implement the smallest reliable fix, and confirm that existing functionality remains intact.

Quick Start

Use the test-driven-development skill to implement the requested feature by writing and running a failing test before production code.

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 software feature?

Test-driven development prevents bugs by requiring you to define expected behavior with a failing test before production code is written, ensuring changes are verified through the Red-Green-Refactor cycle.

How do I use TDD to fix a bug without breaking existing functionality?

The Red-Green-Refactor cycle works by writing a failing test, implementing minimal code to pass it, and then refactoring safely while ensuring the full test suite continues to pass.

Can I use automated testing with mocks during test-first development?

Test-first development encourages clear, minimal tests that exercise real behavior rather than implementation details, using carefully justified mocks only when necessary.

When should I not use the Red-Green-Refactor workflow?

Test-driven development is limited when changes cannot be validated through behavior-focused tests or when expected failures and passing results cannot be clearly defined.