test-driven-development

Enforce a Red-Green-Refactor cycle with failing tests before implementation.

2|1|Updated Mar 1, 2026
One-click install
npx skills add https://github.com/adhi-jp/minecraft-modding-mcp --skill test-driven-development-adhi-jp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/adhi-jp/minecraft-modding-mcp/tree/main/.agents/skills/test-driven-development
Command: npx skills add https://github.com/adhi-jp/minecraft-modding-mcp --skill test-driven-development-adhi-jp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill addresses the common pitfalls of writing code without verification, such as untested edge cases, technical debt, and the false confidence of manual testing. It enforces a disciplined Red-Green-Refactor cycle to ensure every line of production code is backed by a failing test.

Core Features & Use Cases

  • Red-Green-Refactor Enforcement: Guides the user through the mandatory cycle of writing a failing test, implementing minimal code, and refactoring.
  • Anti-Pattern Detection: Provides a comprehensive reference to avoid common testing mistakes like mocking real behavior or polluting production code with test-only methods.
  • Use Case: When implementing a new feature or fixing a bug, use this skill to ensure you define the expected behavior through a test before writing any implementation logic, preventing regressions and ensuring high code quality.

Quick Start

Use the test-driven-development skill to guide the implementation of a new feature by first defining the failing test case.

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 a strict test-driven development workflow for feature development?

To enforce test-driven development, you must adhere to a strict Red-Green-Refactor cycle, writing a failing test before implementing any production code to ensure all features are verified and prevent technical debt.

What are common TDD anti-patterns I should avoid during refactoring?

Common TDD anti-patterns to avoid include mocking real behavior and polluting production code with test-only methods, which compromise software reliability and distort the accuracy of your quality assurance tests.

How do I fix a bug using the Red-Green-Refactor cycle?

To fix a bug using the Red-Green-Refactor cycle, first write a failing test that defines the expected behavior, then implement the minimal code to pass the test, and finally refactor to prevent regressions.

Does test-driven development work for refactoring existing software engineering projects?

Yes, test-driven development works for refactoring tasks by ensuring existing software behavior is verified by failing tests before any code modification, maintaining high software reliability and preventing technical debt.

Why does writing production code before tests lead to technical debt?

Writing production code before tests leads to technical debt because it relies on manual testing and skips the failing test step, resulting in untested edge cases and false confidence in software reliability.

Can I use test-driven development for quality assurance without prior testing experience?

Yes, you can use test-driven development for quality assurance without prior experience by following the disciplined Red-Green-Refactor cycle and referencing provided guidelines to avoid common testing anti-patterns.