test-driven-development

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

19|2|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/bonnguyenitc/antigravity-superpowers --skill test-driven-development-bonnguyenitc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/bonnguyenitc/antigravity-superpowers/tree/main/.agent/skills/test-driven-development
Command: npx skills add https://github.com/bonnguyenitc/antigravity-superpowers --skill test-driven-development-bonnguyenitc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents implementation-first development that produces unverified, brittle code by enforcing a test-first workflow so features and fixes are validated before production code exists.

Core Features & Use Cases

  • Fail-first discipline: Write a minimal failing test that defines intended behavior before implementing any production code.
  • Red → Green → Refactor loop: Verify the test fails for the right reason, implement the minimal change to pass, then refactor while keeping tests green.
  • Verification checklist: Ensure failures are real (not errors), run targeted and full test suites, avoid testing mocks instead of behavior, and add tests for bug fixes and regressions.
  • Use case: Reproduce a bug with a failing test, confirm the failure, implement the fix with minimal changes, then run the suite to prevent regressions.

Quick Start

Create a failing unit test that demonstrates the desired behavior, run the test to confirm it fails, implement the minimal code to make it pass, and then run the full test suite to verify no regressions.

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 new features?

Test-driven development starts by writing a minimal failing unit test that defines the intended behavior. You then implement the minimal production code to pass the test, and run the full test suite to verify no regressions.

What is the Red Green Refactor loop in test-first development?

The Red Green Refactor loop is a test-first workflow where you write a failing test, verify it fails for the right reason, implement minimal code to pass the test, then refactor while keeping the test suite green.

How do I reproduce a bug fix using a failing test?

To reproduce a bug fix with a failing test, write a test that demonstrates the incorrect behavior, confirm the specific failure is real and not an error, implement the minimal fix, and run the full test suite to prevent regressions.

When should I use test-first workflows for refactoring?

Test-first workflows are required for refactors and behavior changes to ensure features and fixes are validated before production code exists. You write a failing test, implement minimal changes to pass, and keep the test output clean.

Why do my unit tests fail with errors instead of expected failures?

Expected failures in test-driven development must be real failures, not errors. This verification ensures your minimal failing test correctly defines the intended behavior before you implement any production code to satisfy it.

Can I use test-driven development for integration testing workflows?

Test-driven development applies to both unit and integration testing workflows. It enforces a test-first discipline across new features, bug fixes, refactors, and behavior changes to ensure production code is validated before it exists.