tdd

Guide software development through the red-green-refactor TDD cycle.

Updated Feb 13, 2026
One-click install
npx skills add https://github.com/g-zenr/relay-api --skill tdd-g-zenr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/g-zenr/relay-api/tree/main/.claude/skills/tdd
Command: npx skills add https://github.com/g-zenr/relay-api --skill tdd-g-zenr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides you through the Test-Driven Development (TDD) process, ensuring robust and well-tested code by enforcing a strict red-green-refactor cycle.

Core Features & Use Cases

  • Structured TDD Workflow: Follows the precise steps of writing failing tests first, then minimal code to pass, and finally refactoring.
  • Best Practice Enforcement: Adheres to specific conventions for test naming, fixtures, error handling, and code quality.
  • Use Case: When developing a new API endpoint, use this Skill to ensure you write tests for success, validation, and error scenarios before writing any implementation code.

Quick Start

Use the tdd skill to implement the new user registration feature following the red-green-refactor cycle.

Frequently Asked Questions about tdd

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

FAQPage Schema
What is the red-green-refactor cycle in test-driven development?

The red-green-refactor cycle in test-driven development is a process of writing failing tests first, creating minimal code to pass them, and then refactoring for quality. This structured workflow ensures robust implementation and enforces best practices.

How do I implement a new API endpoint using test-driven development?

To implement a new API endpoint using test-driven development, write tests for success, validation, and error scenarios before writing any implementation code. Then create minimal code to pass the tests, followed by refactoring.

Can I use test-driven development with my existing project testing conventions?

Yes, you can use test-driven development with existing project testing conventions. The workflow supports adherence to project-specific test naming, fixtures, error handling, and code quality standards throughout the refactoring phase.

What is the best way to ensure code quality during agile refactoring?

The best way to ensure code quality during agile refactoring is to follow a strict test-driven development cycle. By writing failing tests first and implementing minimal code to pass them, you guarantee robust and well-tested code before refactoring.

When should I not use the test-driven development workflow?

You should not use the test-driven development workflow for exploratory programming or throwaway scripts where writing failing tests first provides no long-term value. It is designed for developing robust features requiring strict validation and error handling.