test-driven-development

Enforces red-green-refactor TDD workflow requiring failing tests before production code.

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

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 piece of production code is backed by a test that was watched failing first. ## 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 ("too simple to test", "I'll test after") and red flags that signal TDD is being skipped, requiring a restart. - Vertical Tracer Bullets: Prevents horizontal slicing by requiring one end-to-end behavior slice per cycle instead of writing all tests then all implementation. - 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 without regressions. ## Quick Start Ask the agent to implement a new feature using strict TDD with pytest, 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 it. Re-run the test to verify it passes, run the full suite for regressions, then refactor while keeping tests green.

Why should tests be written before production code?▼

Tests written after code pass immediately, which proves nothing about whether they test the right behavior. Watching a test fail first confirms it actually exercises the missing feature and catches real bugs rather than mirroring the implementation.

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 allowed, but the exploratory code must be discarded and the real implementation restarted with a failing test.

What should I do if my test passes immediately on the first run?▼

An immediately passing test means you are testing existing behavior, not new functionality. Fix the test so it targets the missing feature, verify it fails for the expected reason, then proceed with implementation.

Should I write all tests first and then all the implementation?▼

No, that horizontal slicing produces brittle tests designed before the implementation reveals the real interface. Use vertical tracer bullets instead: complete one red-green cycle per behavior before starting the next test.