test-driven-development

Enforces red-green-refactor test-driven development workflow for features and bugfixes.

Updated Apr 7, 2026
One-click install
npx skills add https://github.com/NT-boop-star/BRMV-tract --skill test-driven-development-nt-boop-star
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/NT-boop-star/BRMV-tract/tree/main/antigravity/skills/test-driven-development
Command: npx skills add https://github.com/NT-boop-star/BRMV-tract --skill test-driven-development-nt-boop-star

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code written before tests often ships with unverified behavior, hidden bugs, and tests that pass immediately without proving anything. This Skill enforces a strict test-first discipline so every line of production code is backed by a test that was watched fail first. ## Core Features & Use Cases - Red-Green-Refactor Enforcement: Guides the full TDD cycle—write a failing test, verify it fails for the right reason, write minimal code to pass, then refactor while staying green. - Anti-Rationalization Guardrails: Provides explicit counters to common excuses like "I'll test after" or "deleting code is wasteful", with red flags that trigger a restart. - Testing Anti-Pattern Reference: Covers pitfalls such as testing mock behavior, test-only methods in production classes, incomplete mocks, and mocking without understanding dependencies. - Use Case: When fixing a bug where empty emails are accepted, write a failing test asserting the rejection, watch it fail, implement the minimal validation, and confirm all tests pass before refactoring. ## Quick Start Ask the AI to implement your next 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 right reason, then write the simplest code that makes it pass. Refactor only while all tests stay green, then repeat the cycle for the next behavior.

How do I write a failing test for a bug fix?

Write a test that reproduces the bug by asserting the correct expected behavior, then run it to watch it fail. Implement the minimal fix, confirm the test passes, and the test now acts as a regression guard.

Why should tests be written before implementation code?

Tests written after code pass immediately, which proves nothing about whether they test the right thing. Watching a test fail first confirms it actually exercises the missing behavior and catches real bugs.

When is it acceptable to skip test-driven development?

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 existence 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.