test-driven-development

Enforce a failing test-first workflow for feature development, bug fixes, and refactoring.

228|35|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/kaminocorp/hermes-alpha --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/tree/main/hermes-agent/skills/software-development/test-driven-development
Command: npx skills add https://github.com/kaminocorp/hermes-alpha --skill test-driven-development-kaminocorp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Implementing features is error-prone without a disciplined testing approach; This Skill enforces a test-first mindset to catch defects early and guide design.

Core Features & Use Cases

  • Red-Green-Refactor cycle: write a failing test first, then implement minimal production code to pass, followed by refactor.
  • Clear behavioral guidance: tests define expected behavior and serve as living documentation.
  • Use Case: starting a new feature, use TDD to drive development and quickly surface design trade-offs.

Quick Start

Write a failing test for a new feature, implement just enough code to pass it, then refactor for clarity and maintainability.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I enforce a failing test-first workflow for new features?

To enforce test-driven development, you must write a failing test before any production code, implement the minimal logic to pass it, and then refactor. This cycle ensures features are driven by behavioral requirements and design flaws surface early.

What is the red-green-refactor cycle in software testing?

The red-green-refactor cycle is the core of test-driven development: write a failing test (red), implement minimal production code to pass it (green), then refactor for clarity while preserving behavior. It guides reliable code design iteratively.

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

Yes, test-driven development applies to bug fixes and refactoring. You write a failing test that captures the bug or desired behavior, implement minimal code to pass it, then refactor safely while ensuring the automated test stays green.

Do I need automated tests and CI set up to start test-driven development?

You need automated tests to validate the red-green-refactor cycle. While CI integration enforces the workflow continuously, the fundamental requirement is a testing framework to run failing tests before writing minimal production code.

Why does test-driven development help catch defects early in software projects?

Test-driven development catches defects early by mandating a failing test before implementation. This forces you to define expected behavior upfront, turning tests into living documentation and quickly surfacing design trade-offs during feature development.

What's the best way to start a new feature using a test-first approach?

The best way to start a new feature is writing a failing test that defines the expected behavior. Then, implement just enough production code to pass the test, and finally refactor the code for clarity and maintainability without breaking the test.