test-driven-development

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

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

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 a failing test, verifying the failure, writing minimal code to pass, then refactoring with tests green. - Rationalization Detection: Provides a checklist of common excuses and red flags that signal TDD is being skipped, with instructions to delete code and restart. - Use Case: When fixing a bug, write a failing test that reproduces it first, then implement the minimal fix and run the full suite to confirm no regressions. ## Quick Start Ask the agent to implement a new feature using strict TDD with pytest, writing and verifying 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. Finally run the full test suite to check for regressions before refactoring.

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.

When is it acceptable to skip TDD?▼

Only for throwaway prototypes, generated code, or configuration files, and only after asking the user first. Everything else, including bug fixes and refactoring, should follow the red-green-refactor cycle.

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

A test that passes immediately is testing existing behavior and proves nothing. Fix the test so it fails for the expected reason, confirming the feature is genuinely missing, before writing any implementation code.

Should I use mocks in TDD unit tests?▼

Prefer testing real code over mocks, since mocking can test the mock's behavior instead of the system under test. Use mocks only when truly unavoidable, and if everything needs mocking, reduce coupling with dependency injection.