test-driven-development

Guide software development through the red-green-refactor TDD cycle.

Updated Jan 30, 2026
One-click install
npx skills add https://github.com/andrescardonas7/salchipapa-web --skill test-driven-development-andrescardonas7
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/andrescardonas7/salchipapa-web/tree/main/.cursor/skills/test-driven-development
Command: npx skills add https://github.com/andrescardonas7/salchipapa-web --skill test-driven-development-andrescardonas7

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces a rigorous Test-Driven Development (TDD) process, ensuring that all new code is written with a preceding, failing test, thereby preventing bugs and improving code reliability.

Core Features & Use Cases

  • Enforces TDD: Mandates writing a failing test before any production code.
  • Red-Green-Refactor Cycle: Guides users through the core TDD loop.
  • Use Case: When developing a new authentication feature, you would first write a test for user login, watch it fail, then write the minimal code to make it pass, and finally refactor.

Quick Start

Use the test-driven-development skill to write a failing test for the new user registration functionality.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I start writing tests first for new software features?

Writing tests first requires defining a failing test for your new feature before any production code is written. You then implement the minimal code needed to make that test pass, ensuring code reliability from the start.

What is the red-green-refactor cycle in test-driven development?

The red-green-refactor cycle in test-driven development is a loop where you first write a failing test, then write minimal code to make it pass, and finally refactor the code while keeping the test green.

How does strict test-driven development handle bug fixes and refactoring?

Strict test-driven development handles bug fixes and refactoring by enforcing a no production code without a failing test first principle. You must reproduce the bug with a failing test before fixing it, ensuring the refactor is verified.

Do I need to write a failing test before writing any production code?

Yes, you need to write a failing test before writing any production code. This strict adherence to the test-driven development methodology prevents bugs and improves overall code quality by validating requirements upfront.

Can I use test-driven development for both new features and debugging?

Yes, you can use test-driven development for both new features and debugging. The methodology enforces writing a failing test first to capture the desired behavior or reproduce the bug, followed by minimal implementation to pass the test.

What's the best way to ensure code quality through testing?

The best way to ensure code quality through testing is to mandate the red-green-refactor cycle. This prevents bugs by requiring a failing test before implementation and validating minimal code changes immediately.