test-driven-development

Enforce Test-Driven Development by mandating failing tests before production code.

19|5|Updated Nov 23, 2025
One-click install
npx skills add https://github.com/Nir-Bhay/markups --skill test-driven-development-nir-bhay
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/Nir-Bhay/markups/tree/main/.agents/skills/test-driven-development
Command: npx skills add https://github.com/Nir-Bhay/markups --skill test-driven-development-nir-bhay

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 failing test preceding it, thereby preventing bugs and improving code quality.

Core Features & Use Cases

  • Enforces TDD Cycle: Guides users through the Red-Green-Refactor cycle.
  • Prevents Regressions: Ensures tests catch bugs before they reach production.
  • Use Case: When implementing a new user authentication feature, use this Skill to write tests for login, logout, and password reset scenarios before writing any actual authentication code.

Quick Start

Always write a failing test before writing any new implementation code.

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 (TDD) is a process where you write a failing test before any production code. The Red-Green-Refactor cycle guides you through writing a failing test, making it pass, and refining the code to prevent regressions.

How do I write tests first when developing new features?

To write tests first during feature development, you mandate the creation of a failing test before writing implementation code. This ensures code quality by verifying that new functionality is immediately covered by tests.

Can I use TDD for bug fixing and refactoring tasks?

Yes, TDD applies to bug fixing and refactoring tasks. You enforce the process by writing a failing test that reproduces the bug or verifies the refactored behavior before modifying any production code.

Why does test-driven development require a failing test before writing production code?

Test-driven development requires a failing test first to validate that your test checks the right behavior and to prevent regressions. This principle ensures all new code is justified by a test.

What is the best way to prevent code regressions during development?

The best way to prevent code regressions is to follow the test-driven development cycle. By writing failing tests before implementation, you ensure all new code and bug fixes are validated against expected behavior.