test-driven-development

Implement a strict Red-Green-Refactor cycle for software development tasks.

Updated Nov 23, 2025
One-click install
npx skills add https://github.com/manuelbrandner85/Weltenbibliothekapp --skill test-driven-development-manuelbrandner85
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/manuelbrandner85/Weltenbibliothekapp/tree/main/.agents/skills/test-driven-development
Command: npx skills add https://github.com/manuelbrandner85/Weltenbibliothekapp --skill test-driven-development-manuelbrandner85

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill eliminates the technical debt and unverified code that arises from writing implementation before testing, ensuring every feature is robust and regression-proof.

Core Features & Use Cases

  • Red-Green-Refactor Cycle: Provides a strict framework for writing failing tests, minimal implementation, and clean refactoring.
  • Anti-Pattern Prevention: Includes a comprehensive guide to avoid common testing pitfalls like mocking behavior instead of real logic.
  • Use Case: When implementing a new API endpoint, use this skill to define the expected behavior in a test file first, ensuring the implementation is driven entirely by requirements rather than assumptions.

Quick Start

Apply the test-driven-development skill to guide the implementation of the new user authentication module by writing the failing test case 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 enforce strict test-driven development cycles for new features?

Test-driven development cycles are enforced by strictly adhering to the Red-Green-Refactor sequence. This workflow prohibits writing production code without a preceding failing test, ensuring high code quality and preventing regressions during feature development.

What is the best way to refactor legacy code without introducing regressions?

Refactoring without regressions requires a strict test-driven development approach. By writing failing tests first to define expected behavior, you can safely apply minimal implementation changes and clean refactoring without accumulating technical debt.

How do I avoid common mocking anti-patterns in unit testing?

Mocking anti-patterns in unit testing are avoided by referencing the skill's comprehensive anti-pattern prevention guide. This ensures you mock real logic appropriately rather than behavior, maintaining robust quality assurance throughout the software engineering lifecycle.

Can I use test-driven development for both bug fixes and new API endpoints?

Test-driven development applies to both bug fixes and new API endpoints. You define expected behavior in a failing test file first, ensuring the implementation is driven entirely by requirements rather than assumptions for any software engineering task.

When should I not use the Red-Green-Refactor cycle?

The Red-Green-Refactor cycle should not be used when writing throwaway prototypes or exploratory code. This strict test-driven development workflow is designed for feature development, bug fixes, and refactoring tasks where preventing regressions and eliminating technical debt are required.