test-driven-development

Enforce the Red-Green-Refactor cycle with failing tests before implementation.

1|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/Luizfbm/Dev-roast --skill test-driven-development-luizfbm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/Luizfbm/Dev-roast/tree/main/.agents/skills/test-driven-development
Command: npx skills add https://github.com/Luizfbm/Dev-roast --skill test-driven-development-luizfbm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill addresses the common pitfalls of writing code without verification, such as untested edge cases, technical debt, and the tendency to write code that is difficult to maintain or refactor.

Core Features & Use Cases

  • Red-Green-Refactor Cycle: Provides a strict framework for writing failing tests before implementation, ensuring every line of production code is verified.
  • Anti-Pattern Prevention: Includes comprehensive guidance on avoiding common testing mistakes like mocking behavior instead of real logic or polluting production code with test-only methods.
  • Use Case: When tasked with implementing a complex feature or fixing a regression, use this skill to systematically define the expected behavior through tests, ensuring the final implementation is robust and regression-proof.

Quick Start

Apply the test-driven-development skill to guide the implementation of the new user authentication module by writing the failing test first.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I implement the Red-Green-Refactor cycle to prevent regressions in software engineering?

The Red-Green-Refactor cycle enforces reliable, bug-free code by writing failing unit tests before implementation, verifying every line of production code against expected behavior to prevent regressions and technical debt.

What is the best way to ensure my feature development is regression-proof?

To ensure feature development is regression-proof, define expected behavior through failing tests before writing code. This test-first principle ensures complex features are robust and systematically verified throughout implementation.

How do I avoid common unit testing anti-patterns when refactoring code?

Avoid unit testing anti-patterns during refactoring by refusing to mock behavior instead of real logic and keeping test-only methods out of production code. This prevents polluting the codebase with fragile, hard-to-maintain tests.

When do I need test-first development for fixing bugs and complex features?

You need test-first development when tasked with fixing a regression or implementing a complex feature. This approach systematically defines expected behavior through tests, ensuring the final implementation remains robust and bug-free.

Does test-driven development work for existing refactoring tasks with technical debt?

Test-driven development works for refactoring tasks with technical debt by applying the Red-Green-Refactor cycle. It verifies existing code behavior through tests before modification, preventing new regressions while improving code maintainability.