test-driven-development

Enforce the Red-Green-Refactor cycle for software development tasks.

9|Updated Jul 3, 2026
One-click install
npx skills add https://github.com/TonyQ-AI/agents-workflow --skill test-driven-development-tonyq-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/TonyQ-AI/agents-workflow/tree/main/skills/test-driven-development
Command: npx skills add https://github.com/TonyQ-AI/agents-workflow --skill test-driven-development-tonyq-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill addresses the common pitfalls of software development, such as fragile code, hidden bugs, and lack of documentation, by enforcing a disciplined Test-Driven Development (TDD) workflow.

Core Features & Use Cases

  • Red-Green-Refactor Cycle: Guides you through writing failing tests, implementing minimal code, and refactoring for quality.
  • Anti-Pattern Prevention: Provides strict guardrails against common testing mistakes like mocking behavior instead of state or polluting production code with test-only methods.
  • Use Case: When implementing a new feature or fixing a bug, use this skill to ensure every line of production code is backed by a failing test, guaranteeing high confidence and preventing regressions.

Quick Start

Use the test-driven-development skill to guide the implementation of a new user authentication module starting with the first failing test case.

Frequently Asked Questions about test-driven-development

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 workflow where you write a failing test, implement minimal code to pass it, and then refactor for quality to ensure robust code.

How do I avoid testing anti-patterns when writing unit tests?

To avoid testing anti-patterns when writing unit tests, follow strict guardrails against mocking behavior instead of state and prevent polluting production code with test-only methods.

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

You should use test-driven development for all feature implementations and bug fixes to guarantee every line of production code is backed by a failing test, ensuring high confidence and preventing regressions.

What's the best way to start implementing a new feature using TDD?

The best way to start implementing a new feature using TDD is to write the first failing test case for the specific module, such as user authentication, before writing any production code.

Why does refactoring code without tests lead to hidden bugs?

Refactoring code without tests leads to hidden bugs because there are no failing tests to enforce strict verification, resulting in fragile code that lacks documentation and reliability.