test-driven-development

Enforce red-green-refactor workflows with failing tests before implementation code.

Updated May 5, 2026
One-click install
npx skills add https://github.com/yanochka11/harness_bro --skill test-driven-development-yanochka11
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/yanochka11/harness_bro/tree/main/.claude/skills/curated/test-driven-development
Command: npx skills add https://github.com/yanochka11/harness_bro --skill test-driven-development-yanochka11

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents unreliable implementations by enforcing a disciplined test-first development process that validates behavior before production code is written.

Core Features & Use Cases

  • Red-Green-Refactor Workflow: Guides developers through writing failing tests, implementing minimal solutions, and safely refactoring while keeping tests passing.
  • Testing Quality Guidance: Helps avoid common testing mistakes such as testing mocks, adding test-only production methods, and creating incomplete mocks.
  • Use Case: Use this Skill when adding features, fixing bugs, or changing behavior in a codebase where confidence, regression prevention, and maintainable tests are required.

Quick Start

Use the test-driven-development skill to implement this feature by writing the failing test first and following the complete TDD cycle.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I implement test-driven development for feature development?

Test-driven development requires writing a failing unit test first, then creating minimal implementation code to pass it, and finally refactoring while keeping tests green. This enforces reliable behavior validation before production code exists.

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

The red-green-refactor workflow is a test-first cycle where you write a failing test (red), implement the minimal solution to pass it (green), and safely refactor the code while maintaining passing tests to ensure regression prevention.

How do I avoid common testing mistakes when using mocks in TDD?

To avoid common testing mistakes with mocks in TDD, ensure you do not test the mocks themselves, avoid adding test-only production methods, and prevent creating incomplete mocks by following strict mock usage guidelines during test validation.

Can I use test-first workflows for bug fixes and refactoring?

Yes, test-first workflows apply to bug fixes and refactoring by requiring a failing test that reproduces the bug or validates behavior changes before modifying production code, ensuring reliable automated testing and regression prevention throughout the process.

Do I need automated testing set up to follow TDD practices?

Yes, you need an environment that supports reliable automated testing to follow TDD practices. The workflow requires executing unit tests repeatedly to validate the red-green-refactor cycle and ensure code quality during behavior changes.