test-driven-development

Enforce a test-first workflow requiring a failing test before production code.

Updated Dec 9, 2025
One-click install
npx skills add https://github.com/h4v1d/extension-collection-geminicli --skill test-driven-development-h4v1d
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/h4v1d/extension-collection-geminicli/tree/main/test-driven-development
Command: npx skills add https://github.com/h4v1d/extension-collection-geminicli --skill test-driven-development-h4v1d

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides developers to adopt test-driven development by ensuring a failing test is written before any production code, reducing ambiguity and preventing regressions.

Core Features & Use Cases

  • Red-Green-Refactor workflow: Provides a structured approach to write failing tests, implement minimal code, and refactor with confidence.
  • Universal applicability: Useful for new features, bug fixes, and refactors across any codebase.

Quick Start

Write a failing test for a small feature, run the test to observe the failure, then implement the smallest amount of production code 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 workflow work?

Test-driven development (TDD) is a workflow where you write a failing test before implementing production code. The red-green-refactor cycle involves writing a failing test, implementing the minimal code to pass it, then refactoring with confidence to reduce regressions.

How do I start writing unit tests first for a new feature?

To start writing unit tests first, write a failing test for a small feature, run the test to observe the failure, then implement the smallest amount of production code to make the test pass. This ensures changes are validated by real tests.

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

Yes, test-driven development is universally applicable for new features, bug fixes, and refactors across any codebase. It requires no special tooling, ensuring changes are validated by minimal, real tests that fail first.

Does test-driven development require any special testing frameworks or dependencies?

No, test-driven development requires no special tooling or dependencies. It promotes writing minimal, real tests that fail first across any project, followed by writing the smallest code necessary to make the tests pass.

Why should I write a failing test before writing production code?

Writing a failing test before production code reduces ambiguity and prevents regressions. This test-first approach enforces a structured workflow, ensuring your changes are validated by real tests and guiding you to implement only the necessary code.