test-driven-development

Enforce Red-Green-Refactor cycles with failing tests before production code.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill eliminates the uncertainty of untested code by enforcing a strict Test-Driven Development (TDD) workflow, ensuring that every feature is verified by a failing test before implementation.

Core Features & Use Cases

  • Red-Green-Refactor Enforcement: Guides the agent through the mandatory cycle of writing a failing test, implementing minimal code, and refactoring.
  • Regression Prevention: Ensures all new code is covered by tests, preventing bugs from creeping into existing functionality.
  • Use Case: When building a new API endpoint, the agent will first write a test that expects the endpoint to return a 200 status code, watch it fail, write the minimal routing logic to make it pass, and then refactor the code for cleanliness.

Quick Start

Use the test-driven-development skill to implement the new user authentication feature by writing the failing test first.

Frequently Asked Questions about test-driven-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does the Red-Green-Refactor loop improve software quality?

Test-driven development eliminates untested code by enforcing a strict workflow that requires a failing test before any production code implementation. This ensures every new feature, bug fix, and refactoring task is verified by tests, preventing regressions.

How do I implement new features using test-driven development?

You enforce test-driven development by following the Red-Green-Refactor cycle: write a failing test for the expected behavior, implement minimal production code to pass the test, and then refactor the code for cleanliness while maintaining a green test state.

Do I need pytest to enforce test-driven development?

Yes, this test-driven development workflow requires a test runner like pytest to be present in your environment. The framework is needed to execute tests, observe failures during the Red phase, and verify minimal code passes during the Green phase.

Can I use test-driven development for bug fixes and refactoring?

Yes, the test-driven development cycle applies to bug fixes and refactoring tasks within a codebase. You must write a failing test that reproduces the bug or verifies the refactored behavior before modifying any production code.

What is the iron law of test-driven development?

The iron law of test-driven development is that no production code should be written without a failing test. This strict rule ensures all logic is driven by test requirements, eliminating untested code and preventing bugs from creeping into existing functionality.