test-driven-development

Enforces RED-GREEN-REFACTOR test-driven development workflow with failing tests before production code.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing code before tests leads to unverified implementations, biased tests-after, and bugs discovered late. This Skill enforces strict test-driven development so every behavior is proven by a failing test before any production code exists. ## Core Features & Use Cases - RED-GREEN-REFACTOR Enforcement: Mandates writing one failing test, verifying the failure, writing minimal passing code, then refactoring with tests green. - Rationalization Countermeasures: Provides a table of common excuses ("too simple to test", "I'll test after") with rebuttals, plus red flags that trigger deleting code and restarting. - Subagent Integration: Shows how to enforce TDD when dispatching implementation tasks via delegate_task and how to pair with systematic-debugging for bug fixes. - Use Case: When fixing a bug, write a failing test that reproduces it first, verify it fails, implement the minimal fix, and confirm the full suite passes to prevent regression. ## Quick Start Ask the agent to implement a new feature using strict TDD, writing and running a failing test before any production code.

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. Re-run the test and the full suite, then refactor while keeping tests green.

What is the RED-GREEN-REFACTOR cycle in TDD?▼

RED means writing a failing test that defines desired behavior. GREEN means writing the minimal code to make it pass, even hardcoding. 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 RED-GREEN cycle per behavior, repeated.

When is it acceptable to skip TDD?▼

Only for throwaway prototypes, generated code, or configuration files, and only after asking the user first. Exploration is fine, but the exploratory code should be discarded and the real implementation restarted test-first.

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

A test that passes immediately proves nothing; it may test existing behavior or the wrong thing. Watching it fail confirms the test actually exercises the missing feature and fails for the expected reason, not a typo.

What should I do if I already wrote code before tests?▼

Delete the code and start over with TDD. Keeping it as reference or adapting it while writing tests is effectively testing after, which biases tests toward the implementation rather than the required behavior.