test-driven-development

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

6|Updated Jul 12, 2026
One-click install
npx skills add https://github.com/josoroma/AppLoop --skill test-driven-development-josoroma
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/josoroma/AppLoop/tree/main/.hermes/skills/software-development/test-driven-development
Command: npx skills add https://github.com/josoroma/AppLoop --skill test-driven-development-josoroma

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 failing test before implementation begins. ## 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. - Subagent Integration: Provides patterns for delegating implementation tasks to subagents with TDD requirements embedded in the goal. - 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 Ask the agent to implement a new feature using strict TDD with a failing test first, then minimal code to pass, then refactor.

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 step by step?▼

Write one minimal failing test for a single behavior, run it to confirm it fails for the expected reason, write the simplest code to make it pass, then refactor while keeping tests green. Repeat one cycle at a time rather than writing all tests upfront.

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 pass that test, even hardcoding values. Refactor means cleaning up duplication and names while keeping all tests passing.

Should I write tests before or after writing code?▼

Write tests before code. Tests written after implementation pass immediately, which proves nothing and biases you toward testing what you built rather than what is required. Watching a test fail first confirms it actually tests something.

When is it acceptable to skip TDD?▼

Only for throwaway prototypes, generated code, or configuration files, and only after asking the user explicitly. Bug fixes, new features, and refactoring should always follow the test-first cycle without exceptions.

Why does my test pass immediately on the first run?▼

An immediately passing test means you are testing existing behavior or the test is wrong. Fix the test so it fails for the expected reason, such as a missing feature, before writing any implementation code.