test-driven-development

Enforces red-green-refactor TDD workflow requiring failing tests before writing production code.

Updated Jan 16, 2026
One-click install
npx skills add https://github.com/dudqks0319-cpu/antigravity-skills --skill test-driven-development-dudqks0319-cpu
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/dudqks0319-cpu/antigravity-skills/tree/main/test-driven-development
Command: npx skills add https://github.com/dudqks0319-cpu/antigravity-skills --skill test-driven-development-dudqks0319-cpu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developers often write tests after implementation, which proves nothing about whether the tests actually verify behavior. This Skill enforces strict test-driven development so every feature and bugfix starts with a failing test, eliminating untested code and rationalized shortcuts. ## Core Features & Use Cases - Red-Green-Refactor Enforcement: Guides the full TDD cycle with mandatory verification that tests fail correctly before implementation and pass after. - Anti-Rationalization Guardrails: Counters common excuses like "I'll test after" or "deleting code is wasteful" with concrete rebuttals and red-flag checklists. - Testing Anti-Pattern Reference: Includes a companion reference covering mock misuse, test-only production methods, incomplete mocks, and over-mocking. - Use Case: When fixing a bug where empty emails are accepted, write a failing test asserting the rejection error, watch it fail, implement minimal validation, verify it passes, then refactor. ## Quick Start Ask the assistant to implement a new feature or bugfix using strict test-driven development with a failing test written first.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I practice test-driven development on a new feature?▼

Write one minimal failing test describing the desired behavior, run it to confirm it fails for the expected reason, then write the simplest code to make it pass. After green, refactor while keeping tests passing, then repeat for the next behavior.

How do I fix a bug using TDD?▼

Write a failing test that reproduces the bug first, then implement the minimal fix until the test passes. This proves the fix works and creates a regression test preventing the bug from returning.

Why should tests be written before implementation code?▼

Tests written after code pass immediately, which proves nothing about whether they test the right behavior. Watching a test fail first confirms it actually exercises the missing feature rather than existing behavior or mocks.

When is it acceptable to skip TDD?▼

Exceptions are limited to throwaway prototypes, generated code, and configuration files, and only with explicit approval from your human partner. Exploration is fine, but the exploratory code should be discarded and rewritten test-first.

What are common mocking mistakes in unit tests?▼

Common mistakes include asserting on mock elements instead of real behavior, adding test-only methods to production classes, mocking without understanding side effects, and creating incomplete mocks missing fields downstream code uses.