test-driven-development

Enforces a test-first workflow with red-green-refactor cycles for software development.

Updated Apr 18, 2026
One-click install
npx skills add https://github.com/sammy9322/ventura-dental-facturacion --skill test-driven-development-sammy9322
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/sammy9322/ventura-dental-facturacion/tree/main/.agents/skills/test-driven-development
Command: npx skills add https://github.com/sammy9322/ventura-dental-facturacion --skill test-driven-development-sammy9322

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the risk of shipping untested, buggy production code by enforcing a strict test-first development workflow, reducing regressions and post-deployment debugging time.

Core Features & Use Cases

  • Strict TDD Workflow: Enforces the red-green-refactor cycle for all new features, bug fixes, and refactoring work, with mandatory verification that tests fail before implementation.
  • Anti-Pattern Guardrails: Includes guidance to avoid common testing mistakes like testing mock behavior, adding test-only code to production, and incomplete mocking.
  • Use Case: When building a new patient payment processing feature for the Ventura Dental system, use this Skill to write a failing test for invalid payment amounts first, then implement minimal validation logic to pass the test, ensuring no bad data enters the system.

Quick Start

Use the test-driven-development skill to write a failing test for the new patient appointment scheduling feature before writing any implementation code for the feature.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
What is test-driven development and how does the red-green-refactor cycle work?

Test-driven development is a workflow where you write a failing test, implement minimal code to pass it, then refactor. The red-green-refactor cycle enforces this sequence to eliminate untested production code and reduce regressions.

How do I write unit tests before implementation code for new features?

To write unit tests before implementation, start by creating a failing test that defines the desired behavior. Run it to verify failure, then write the minimal production logic needed to make the test pass, ensuring behavior-focused coverage.

Can I use test-driven development for both frontend and backend codebases?

Yes, you can use test-driven development across backend, frontend, and full-stack codebases. It enforces a strict test-first workflow for new feature implementation, bug fixes, refactoring, and behavior changes regardless of the stack.

What are common testing anti-patterns to avoid during refactoring?

Common testing anti-patterns during refactoring include testing mock behavior instead of actual logic, adding test-only code to production systems, and incomplete mocking. Avoiding these ensures tests remain behavior-focused and reliable.

Why do my TDD tests pass but production code still has bugs?

If TDD tests pass but bugs remain, you may be testing mock behavior rather than real logic or adding test-only code to production. Strict adherence to verifying test failure before implementation and avoiding incomplete mocking prevents this.

Do I need to verify test failure before writing implementation code?

Yes, verifying test failure before writing implementation code is mandatory. This confirms the test is valid and actually checks the desired behavior, preventing false positives and ensuring the red-green-refactor cycle works correctly.