test-driven-development

Enforce test-first development with the RED-GREEN-REFACTOR cycle.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforces test-first development to ensure robust software behavior.

Core Features & Use Cases

  • Red-Green-Refactor cycle guidance and mandatory failing tests before production code.
  • Clear conventions for naming tests, writing minimal code, and safe refactoring.
  • Use case: when adding a new feature, or making a bug fix, or performing a refactor, follow the TDD workflow to maintain behavior and guard against regressions.

Quick Start

Write a failing test first, then implement the minimal code to pass, and refactor for clarity.

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 cycle work in test-driven development?

The red-green-refactor cycle in test-driven development mandates writing a failing test first, implementing minimal production code to pass it, and then refactoring for clarity. This enforces test-first discipline to ensure robust software behavior.

How do I use unit testing to prevent regressions when refactoring code?

To prevent regressions when refactoring, use test-driven development by writing failing unit tests before modifying production code. This ensures minimal viable code changes and guards existing software behavior against regressions during refactoring.

What is the best way to add a new feature using TDD?

The best way to add a new feature using TDD is following the test-first workflow: write a failing test, implement minimal viable production code to pass the test, and refactor for clarity to maintain robust software behavior.

Can I apply test-first development to bug fixes and feature development?

Yes, test-first development applies to feature development, bug fixes, and refactoring across typical software projects. It mandates writing failing tests before coding to maintain behavior and guard against regressions.

Why should I write a failing test before writing production code?

You should write a failing test before production code because test-driven development mandates it to ensure robust software behavior. This minimal viable code approach enforces test-first discipline and guards against regressions.

What conventions does TDD require for naming tests and writing minimal code?

TDD requires clear conventions for naming tests, writing minimal viable production code, and safe refactoring. This test-first discipline ensures robust software behavior and guards against regressions across typical software projects.