test-driven-development

Enforce test-first development with failing tests before production code.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/bearhedge/APE-YOLO --skill test-driven-development-bearhedge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/bearhedge/APE-YOLO/tree/main/.claude/skills/test-driven-development
Command: npx skills add https://github.com/bearhedge/APE-YOLO --skill test-driven-development-bearhedge

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps prevent defects by enforcing a test-first workflow where code is written only after a failing test is defined.

Core Features & Use Cases

  • Red-Green-Refactor cycle: Write a failing test, implement minimal code to pass, and refactor while keeping tests green.
  • Behavior-driven risk reduction: Establish clear expectations before implementing features or fixes.
  • Educational workflow: Teaches teams and individuals to document intent through tests and evolve design safely.

Quick Start

Write a failing test that describes the new behavior, then implement the smallest amount of production code required to make the test pass.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
What is test-driven development and how does the red-green-refactor cycle work?

Test-driven development is a test-first workflow requiring a failing test before writing production code. The red-green-refactor cycle works by writing a failing test, implementing minimal code to pass it, and refactoring while keeping tests green.

How do I use test-first development to prevent bugs during feature development?

To use test-first development for bug prevention, write a failing test that describes the new behavior, then implement the smallest amount of production code required to make the test pass before deploying.

Can I apply test-driven development when refactoring existing code?

Yes, you can apply test-driven development when refactoring existing code. It establishes clear behavior expectations before changes, allowing you to evolve design safely and continuously refactor while keeping tests green.

Do I need unit tests before starting test-first development?

You need to write a failing unit test as the first step of test-first development. This test defines the expected behavior and ensures correct functionality before any production code is implemented.

Why does writing production code before tests lead to more defects?

Writing production code before tests leads to defects because it lacks enforced behavior expectations. Test-first development solves this by requiring failing tests upfront to catch bugs early and document intent.