test-driven-development

Enforces red-green-refactor test-driven development workflow before writing implementation code.

Updated Jul 22, 2026
One-click install
npx skills add https://github.com/jeremylightsmith/relay-config --skill test-driven-development-jeremylightsmith
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/jeremylightsmith/relay-config/tree/main/.claude/skills/test-driven-development
Command: npx skills add https://github.com/jeremylightsmith/relay-config --skill test-driven-development-jeremylightsmith

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It prevents untested production code by requiring a failing test before any implementation, ensuring tests actually verify the intended behavior rather than rubber-stamping code written first. ## Core Features & Use Cases - Red-Green-Refactor Discipline: Guides writing one minimal failing test, watching it fail for the right reason, then writing minimal code to pass. - Mandatory Verification Gates: Requires watching each test fail and pass, with pristine output and no warnings. - Bug Fix Workflow: Reproduces bugs with a failing test first, proving the fix and preventing regressions. - Use Case: When adding a feature to an Elixir/Phoenix app, write an ExUnit test for the new behavior, confirm it fails because the feature is missing, then implement the minimal code to make it pass. ## Quick Start Ask the assistant to implement a new feature 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 for a single behavior, run it to confirm it fails because the feature is missing, then write the simplest code that makes it pass. Refactor only while tests stay green, then repeat for the next behavior.

How do I write a failing test first in Elixir ExUnit?▼

Write a test asserting the desired behavior, then run it with mix test test/path/to_test.exs:LINE. Confirm it fails for the right reason — a missing feature, not a compile error or typo — before writing any implementation code.

Why must I watch the test fail before implementing?▼

A test that passes immediately proves nothing — it may test existing behavior or the wrong thing. Watching it fail confirms the test actually detects the missing behavior, so the later pass is meaningful.

What should I do if I already wrote code before the test?▼

Delete the implementation and start over from a failing test. Keeping the code as reference biases the tests toward the existing implementation, defeating the purpose of test-first development.

When is it acceptable to skip test-driven development?▼

Only for throwaway prototypes, generated code, or config files — and only after asking the user first. Bug fixes are never exempt: reproduce the bug with a failing test before fixing it.