test-driven-development

Enforce the Red-Green-Refactor cycle for feature implementations and bug fixes.

8|1|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/HumanBean17/jrag --skill test-driven-development-humanbean17
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/HumanBean17/jrag/tree/main/.claude/skills/test-driven-development
Command: npx skills add https://github.com/HumanBean17/jrag --skill test-driven-development-humanbean17

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 every line of production code is backed by a verified, failing-first 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 identify and avoid common testing pitfalls like mocking real behavior or polluting production code with test-only methods.
  • Use Case: When implementing a new microservice feature, use this skill to ensure the logic is driven by requirements-based tests rather than implementation-biased assumptions.

Quick Start

Apply the test-driven-development skill to guide the implementation of the new user authentication module by starting with a 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 strict test-driven development when writing new software features?

Test-driven development prevents unreliable code by enforcing a Red-Green-Refactor workflow, requiring you to write a failing test first, implement minimal code to pass it, and then refactor safely.

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

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

How do I apply TDD to bug fixes within a software development lifecycle?

To apply TDD to bug fixes, start by writing a failing test that reproduces the specific bug, implement the minimal code required to make the test pass, and then refactor the production code safely.

Does test-driven development work for microservice feature implementations?

Test-driven development works for microservices by guiding you to drive feature implementation through requirements-based tests rather than implementation-biased assumptions, ensuring reliable and well-tested logic.

When should I not use test-driven development for quality assurance?

You should avoid test-driven development when implementation details are highly volatile or undefined, as the strict cycle requires clear, testable requirements to drive the production code effectively.

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

The Red-Green-Refactor cycle is a core testing workflow where you write a failing test, implement minimal code to pass the test, and then refactor the code to improve quality without changing behavior.