test-driven-development

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code written without tests-first discipline often ships with undetected bugs, untestable designs, and no regression safety net. This Skill enforces strict test-driven development so every behavior change is proven by a failing test before any production code exists. ## Core Features & Use Cases - RED-GREEN-REFACTOR Enforcement: Guides the agent through writing one failing test, verifying the failure, writing minimal passing code, and refactoring with tests kept green. - Rationalization Detection: Lists common excuses for skipping TDD ("too simple to test", "I'll test after") and red flags that trigger a delete-and-restart response. - Subagent Integration: Provides templates for dispatching implementation tasks via delegate_task with TDD requirements embedded, and pairs with systematic-debugging for bug reproduction tests. - Use Case: When adding a retry mechanism to an API client, the agent first writes a test asserting three retry attempts, watches it fail, implements the minimal retry loop, confirms the full pytest suite passes, then refactors. ## Quick Start Ask the agent to implement a new feature or bug fix using strict test-driven development with the project's test command such as pytest tests/ -q.

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 specific test and the full suite with pytest tests/ -q before refactoring.

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

RED means writing a failing test that defines desired behavior, GREEN means writing minimal code to make it pass, and REFACTOR means cleaning up duplication and names while keeping all tests green. Each cycle covers one behavior at a time.

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 so each test builds on what the implementation taught you.

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

Only for throwaway prototypes, generated code, or configuration files, and only after asking the user explicitly. Exploratory spikes are allowed, but the exploration code must be discarded and the real implementation restarted with TDD.

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.

How do I fix a bug using test-driven development?▼

Write a failing test that reproduces the bug first, then implement the minimal fix until the test passes. This proves the fix works and creates a permanent regression test, pairing naturally with systematic debugging.