test-driven-development

Enforces Red-Green-Refactor cycle for implementing software features and bug fixes.

1|Updated Jul 21, 2026
One-click install
npx skills add https://github.com/dogekiki/SP-test --skill test-driven-development-dogekiki
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/dogekiki/SP-test/tree/main/skills/test-driven-development
Command: npx skills add https://github.com/dogekiki/SP-test --skill test-driven-development-dogekiki

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill eliminates technical debt and unreliable code by enforcing a strict Red-Green-Refactor cycle, ensuring that every line of production code is backed by a failing test that was written first.

Core Features & Use Cases

  • Strict TDD Enforcement: Prevents the common pitfall of writing tests after implementation, which often leads to false confidence and untested edge cases.
  • Anti-Pattern Mitigation: Provides a comprehensive framework for identifying and avoiding common testing mistakes like mocking behavior instead of real logic.
  • Use Case: When tasked with implementing a complex feature or fixing a persistent bug, use this skill to systematically define the expected behavior through tests before writing any implementation code.

Quick Start

Activate the test-driven-development skill to guide the implementation of a new feature by writing a 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 test-driven development for reliable code?

To enforce test-driven development, you must adhere to a strict Red-Green-Refactor cycle that prohibits writing production code without a preceding failing test. This workflow ensures high code quality and prevents regressions.

What is the Red-Green-Refactor cycle in software engineering?

The Red-Green-Refactor cycle is a test-driven development workflow requiring you to write a failing test first, implement the minimum code to pass it, and then refactor. This prevents technical debt and untested edge cases.

Why does writing tests after implementation lead to false confidence?

Writing tests after implementation often leads to false confidence because the tests are tailored to existing logic, missing untested edge cases and failing to define expected behavior before production code is written.

How do I fix persistent bugs using test-driven development?

To fix persistent bugs using test-driven development, you systematically define the expected behavior through a failing test that captures the bug before writing any implementation code. This ensures the fix is verified and prevents regressions.

What are common testing anti-patterns when mocking behavior in TDD?

Common testing anti-patterns in TDD include mocking behavior instead of verifying real logic, which creates false confidence. The test-driven development workflow mitigates these mistakes by enforcing strict test-first principles.

Can I use test-driven development for refactoring existing software projects?

Yes, you can use test-driven development for refactoring tasks within a software project. The strict Red-Green-Refactor cycle applies to all feature development, bug fixes, and refactoring to ensure reliable, bug-free code.