test-driven-development

Enforce RED-GREEN-REFACTOR sequencing with failing tests before implementation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents code from being written before its behavior is proven by a failing test, reducing regressions and guesswork during development.

Core Features & Use Cases

  • Test-first workflow: Start with a minimal failing test, confirm the failure, then implement only what is needed to pass.
  • Red-Green-Refactor discipline: Verify each stage explicitly so you know the test is meaningful and the code change is safe.
  • Practical use cases: Use it for new features, bug fixes, refactoring, and behavior changes where confidence and repeatability matter.

Quick Start

Use the test-driven-development skill to write a failing test for the next change, run it, implement the smallest code needed to pass, and then rerun the full test suite.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I write unit tests before implementing new features?

Test-driven development requires starting with a minimal failing test, confirming the explicit failure, and then writing only the code needed to pass. This test-first workflow reduces regressions and guesswork during software development.

What is the red-green-refactor cycle in TDD?

The red-green-refactor cycle is a strict TDD sequencing method where you verify a failing test (red), implement minimal code to pass it (green), and then refactor safely. Explicitly verifying each stage ensures the test is meaningful and the code change is safe.

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

Use test-driven development for bug fixes and refactoring when confidence and repeatability matter. It prevents unverified production code by defining expected behavior through failing tests first, ensuring safe behavior changes and regression prevention in testable codebases.

Can I use pytest for test-driven development in my codebase?

Yes, pytest supports the test-driven development workflow. You use it to write a failing test for your next change, run it to verify the failure, implement the smallest code needed to pass, and rerun the full test suite for regression checking.

What are the limitations of test-first development?

Limitations of test-first development include its strict requirement for testable codebases and the rigid red-green-refactor sequencing. It is less suited for codebases where behavior cannot be easily isolated or when rapid prototyping outpaces writing explicit failure verification tests.