test-driven-development

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

Updated Aug 21, 2026
One-click install
npx skills add https://github.com/ewtodd/son-of-anton --skill test-driven-development-ewtodd
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/ewtodd/son-of-anton/tree/main/skills/software-development/test-driven-development
Command: npx skills add https://github.com/ewtodd/son-of-anton --skill test-driven-development-ewtodd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers often write code first and add tests afterward, which produces tests that pass immediately and prove nothing about correctness. This Skill enforces strict test-driven development so every behavior is verified by a test that was watched failing before implementation. ## Core Features & Use Cases - Red-Green-Refactor Enforcement: Mandates writing one failing test, verifying the failure, writing minimal code to pass, then refactoring with tests green. - Rationalization Detection: Lists common excuses for skipping TDD and red flags that trigger deleting code and restarting with tests first. - Vertical Tracer Bullets: Prevents horizontal slicing by requiring one end-to-end test-implementation cycle at a time. - Use Case: When fixing a bug, write a failing test that reproduces it, watch it fail, implement the minimal fix, and confirm the full suite passes without regressions. ## Quick Start Use the test-driven-development skill to implement the retry feature, writing a failing pytest test first and only then the minimal code to make it pass.

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 with pytest?▼

Write one minimal failing test for a single behavior, run it with pytest to confirm it fails for the expected reason, then write the simplest code to pass it. Re-run the test and the full suite, then refactor while keeping all tests green.

What is the red-green-refactor cycle in TDD?▼

Red means writing a failing test that defines the desired behavior. Green means writing the minimal code to make that test pass, even hardcoding values. Refactor means cleaning up duplication and names while keeping all tests passing.

Should I write all tests before implementing anything?▼

No. Writing all tests first is horizontal slicing and produces brittle tests designed before the implementation teaches you the real interface. Use vertical tracer bullets: one test, one implementation, repeated per behavior.

When is it acceptable to skip TDD?▼

Only for throwaway prototypes, generated code, or configuration files, and only after asking the user explicitly. Exploratory code is allowed but must be deleted and rewritten test-first before becoming production code.

Why must I watch the test fail before writing code?▼

A test that passes immediately proves nothing; it may test the wrong thing or existing behavior. Watching it fail confirms the test actually exercises the missing feature and would catch the bug it targets.