test-driven-development

Enforce the Red-Green-Refactor cycle for all code changes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill eliminates the uncertainty of untested code and prevents regression bugs by enforcing a strict Red-Green-Refactor cycle before any production code is written.

Core Features & Use Cases

  • Red-Green-Refactor Enforcement: Guides the user through writing a failing test, implementing minimal code, and refactoring.
  • Anti-Pattern Detection: Provides guardrails against common testing mistakes like mocking behavior instead of real logic.
  • Use Case: When implementing a new feature or fixing a bug, this skill ensures you define the expected behavior through a test first, guaranteeing that your implementation is verified and maintainable.

Quick Start

Use the test-driven-development skill to guide the implementation of a 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 enforce the Red-Green-Refactor cycle when writing unit tests?

The test-driven development methodology guides you to write a failing test first, implement minimal code to make it pass, and then refactor. This strict cycle prevents regression bugs and eliminates the uncertainty of untested code.

What's the best way to prevent regression bugs during software refactoring?

The best way to prevent regression bugs during refactoring is test-driven development. By defining expected behavior through a failing test before modifying production code, you ensure your implementations remain verified, reliable, and maintainable.

How do I avoid common anti-patterns when writing unit tests for new features?

To avoid common unit testing anti-patterns when building features, follow a strict test-driven development cycle. This provides guardrails against testing mistakes like mocking behavior instead of verifying real logic, ensuring high code quality.

Can I fix bugs without writing a failing test first?

No, fixing bugs without writing a failing test first is prohibited. Test-driven development requires adherence to the Red-Green-Refactor cycle for all bug fixes and feature implementations to guarantee the fix is verified and maintainable.

When do I need to apply the test-driven development methodology?

You need to apply the test-driven development methodology across all feature implementations, bug fixes, and refactoring tasks within the software development lifecycle. It is required whenever production code is being created or modified.