test-driven-development

Enforces RED-GREEN-REFACTOR test-first workflow for features and bugfixes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code written before tests often ships with undetected bugs, and tests written after implementation pass immediately without proving they test the right behavior. This Skill enforces a strict test-first discipline so every line of production code is backed by a test that was watched failing first. ## Core Features & Use Cases - RED-GREEN-REFACTOR Enforcement: Guides the full cycle of writing a failing test, verifying the failure, writing minimal passing code, and refactoring safely. - Rationalization Detection: Lists common excuses for skipping TDD ("too simple to test", "I'll test after") with concrete rebuttals and red flags that trigger a restart. - Subagent Integration: Provides templates for dispatching implementation subagents with TDD requirements embedded in their goals via delegate_task. - Use Case: When fixing a bug in a retry mechanism, write a failing test that reproduces the failure, watch it fail, implement the minimal fix, verify it passes, then run the full suite to catch regressions. ## Quick Start Ask the agent to implement a new feature or bugfix using strict test-driven development with a failing test written and verified 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 failing test for a single behavior, run it with pytest to confirm it fails for the expected reason, then write the minimal code to pass. Re-run the specific test, then the full suite with pytest tests/ -q to check for regressions before refactoring.

Why should tests be written before implementation 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 the intended bug.

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

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

What should I do if a new test passes immediately?▼

An immediately passing test means it is testing existing behavior rather than the new feature. Fix the test so it targets the missing behavior, then verify it fails before writing any implementation code.

How do I handle code that is hard to test?▼

Hard-to-test code signals an unclear or overly coupled design. Simplify the interface, use dependency injection instead of heavy mocking, and extract helpers when test setup becomes large.