test-driven-development

Implement a RED-GREEN-REFACTOR workflow to guide code changes with tests.

2|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/GoBeromsu/obsidian-workspace --skill test-driven-development-goberomsu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/GoBeromsu/obsidian-workspace/tree/main/.claude/skills/test-driven-development
Command: npx skills add https://github.com/GoBeromsu/obsidian-workspace --skill test-driven-development-goberomsu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Drives development with tests. Use when implementing any logic, fixing any bug, or changing any behavior. Use when you need to prove that code works, when a bug report arrives, or when you're about to modify existing functionality.

Core Features & Use Cases

  • Establishes a RED-GREEN-REFACTOR workflow to guide development from failing tests to passing code.
  • Promotes bug reproduction via tests, supports Prove-It pattern, and encourages descriptive task naming for maintainability.
  • Applicable to new features, bug fixes, refactors, and edge-case handling across typical software projects.

Quick Start

Write a failing test first, then implement the minimal code to make it pass, and finally refactor for clarity and maintainability.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I use test-driven development to fix bugs and prove code correctness?

Test-driven development fixes bugs by writing a failing unit test that reproduces the issue, then implementing minimal code to pass it. This Prove-It pattern verifies correctness before deploying the fix.

What is the red-green-refactor workflow for unit tests?

The red-green-refactor workflow drives code changes by first writing a failing unit test, implementing the minimal code required to make it pass, and finally refactoring the code for clarity and maintainability without changing behavior.

When should I apply test-driven development for new features and refactoring?

Apply test-driven development whenever implementing new features, fixing bugs, or refactoring existing functionality. It guides development from failing tests to passing code, ensuring code correctness and handling edge cases across typical software projects.

Do I need any specific testing frameworks to start writing failing tests first?

No specific testing frameworks are required. The workflow applies structured test-driven development patterns across typical software projects using any unit testing framework to enforce red-green-refactor cycles and descriptive task naming.

How do I reproduce a bug using a test before modifying existing functionality?

Reproduce a bug by writing a failing unit test that captures the exact erroneous behavior before changing any code. Once the bug is reproduced, implement the fix to turn the failing test green, proving the issue is resolved.