test-driven-development

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

Updated Sep 20, 2026
One-click install
npx skills add https://github.com/GreenyZA/neo-light --skill test-driven-development-greenyza
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/GreenyZA/neo-light/tree/main/.hermes-home/skills/software-development/test-driven-development
Command: npx skills add https://github.com/GreenyZA/neo-light --skill test-driven-development-greenyza

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code written before tests often ships with unverified behavior, hidden bugs, and no regression safety net. This Skill enforces strict test-driven development so every feature, bug fix, and refactor is backed by a test that was watched fail first, proving it actually tests the right thing. ## Core Features & Use Cases - RED-GREEN-REFACTOR Enforcement: Guides the full cycle of writing one failing test, verifying the failure, writing minimal code to pass, and refactoring with tests kept green. - Rationalization Detection: Lists common excuses ("too simple to test", "I'll test after") and red flags that signal TDD was skipped, with instructions to delete code and restart. - Subagent Integration: Provides templates for dispatching implementation subagents via delegate_task with TDD requirements embedded in the goal, plus pytest terminal commands for each verification step. - Use Case: When fixing a bug, write a failing test that reproduces it first, then implement the minimal fix and run the full suite to confirm no regressions. ## Quick Start Ask the agent to implement a new feature using strict TDD, writing a failing pytest test first and verifying it fails before writing 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 it. Re-run the test and the full suite, then refactor while keeping all tests green.

What is the RED-GREEN-REFACTOR cycle?▼

RED means writing a failing test that defines the desired behavior. GREEN means writing the minimal code to make it pass, even hardcoding values. REFACTOR means cleaning up duplication and names while keeping tests passing.

Should I write all tests before implementing anything?▼

No. Writing all tests first is horizontal slicing and produces brittle tests detached from the real interface. Use vertical tracer bullets instead: complete one RED-GREEN cycle per behavior before starting the next test.

When is it acceptable to skip TDD?▼

Only for throwaway prototypes, generated code, or configuration files, and only after asking the user first. Exploratory code is allowed but must be thrown away before restarting with a failing test.

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

A test that passes immediately proves nothing; it may test existing behavior, the wrong thing, or a mock instead of real code. Watching it fail confirms the test actually detects the missing feature.

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

Delete the code and start over with a failing test. Keeping it as reference or adapting it while writing tests biases the tests toward the implementation, which defeats the purpose of test-first development.