test-driven-development

Enforces RED-GREEN-REFACTOR test-driven development workflow for writing tests before production code.

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

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 discipline so every piece of production code is backed by a test that was watched failing first. ## Core Features & Use Cases - RED-GREEN-REFACTOR Enforcement: Guides the agent through writing a failing test, verifying the failure, writing minimal passing code, and refactoring safely. - Rationalization Detection: Lists common excuses for skipping TDD and red flags that trigger a restart of the cycle. - Subagent Integration: Provides templates for delegating implementation tasks with TDD requirements via delegate_task and the terminal tool. - Use Case: When fixing a bug, the agent first writes a failing test that reproduces the bug, then implements the minimal fix, guaranteeing the fix is verified and regression-protected. ## Quick Start Ask the agent to implement a new feature or bug fix using strict test-driven development with tests written and verified failing 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 the desired behavior, run it with pytest to confirm it fails for the expected reason, then write the simplest code to make it pass. Finally run the full test suite to check for regressions before refactoring.

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

RED means writing a failing test that defines the desired behavior. GREEN means writing the minimal code to make that test pass. REFACTOR means cleaning up duplication and names while keeping all tests green.

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

TDD can be skipped only for throwaway prototypes, generated code, or configuration files, and only after asking the user first. Bug fixes, new features, and refactoring should always follow the test-first cycle.

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.

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

A test that passes immediately is testing existing behavior, not the new feature. Fix the test so it targets the missing behavior, verify it fails for the expected reason, then proceed with implementation.