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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enforces a rigorous Test-Driven Development (TDD) workflow, ensuring that code is written to meet specific, tested requirements before implementation, thereby reducing bugs and improving code reliability.

Core Features & Use Cases

  • Enforces RED-GREEN-REFACTOR cycle: Guides users through writing a failing test, writing minimal code to pass, and then refactoring.
  • Prevents regressions: Ensures that new code doesn't break existing functionality.
  • Use Case: When developing a new feature, use this Skill to write a test that defines the expected behavior, then write the simplest code to make that test pass, and finally clean up the code while keeping tests green.

Quick Start

Use the terminal tool to run pytest tests/test_feature.py::test_name -v to verify test failure.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I start test-driven development for a new software feature?

Test-driven development starts by writing a failing test that defines expected behavior, then writing minimal implementation code to pass that test, and finally refactoring while keeping tests green.

What is the RED-GREEN-REFACTOR cycle in software engineering?

The RED-GREEN-REFACTOR cycle is a test-driven development workflow where you write a failing test (RED), write minimal code to pass it (GREEN), and then clean up the implementation (REFACTOR) to prevent regressions.

How do I enforce TDD when fixing bugs in existing code?

To enforce TDD during bug fixes, write a failing test that reproduces the specific bug, write the simplest code to make that test pass, and refactor the implementation to ensure code reliability and prevent future regressions.

Can I run test-driven development workflows using terminal commands?

Yes, test-driven development workflows use terminal commands to verify test failures, such as running pytest tests/test_feature.py::test_name -v to ensure the initial failing test behaves as expected before implementation.

Does test-driven development work with subagent workflows?

Yes, test-driven development integrates with delegate_task for subagent workflows, guiding subagents through the strict RED-GREEN-REFACTOR cycle to ensure code quality across distributed software development tasks.

Why use test-driven development instead of writing tests after implementation?

Test-driven development is used instead of post-implementation testing to enforce rigorous workflow requirements upfront, ensuring code is written to meet specific tested criteria, thereby reducing bugs and improving overall code reliability.