test-driven-development

Enforce the Red-Green-Refactor Test-Driven Development cycle for software implementation.

Updated Jan 26, 2026
One-click install
npx skills add https://github.com/Was85/ralph-rlm-agent-framework --skill test-driven-development-was85
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/Was85/ralph-rlm-agent-framework/tree/main/claude-code/shell/.claude/skills/test-driven-development
Command: npx skills add https://github.com/Was85/ralph-rlm-agent-framework --skill test-driven-development-was85

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enforces a rigorous Test-Driven Development (TDD) workflow, ensuring that all production code is written only after a failing test has been created, thereby preventing regressions and improving code reliability.

Core Features & Use Cases

  • Enforces Red-Green-Refactor: Guides the developer through the mandatory cycle of writing a failing test, writing minimal code to pass, and then refactoring.
  • Bug Prevention: Guarantees that no production code is committed without a corresponding test, catching bugs early.
  • Use Case: When developing a new user authentication feature, you would first write a test for a successful login, see it fail, write the minimal code to make it pass, and then refactor.

Quick Start

Use the test-driven-development skill to write a failing test for the new login functionality.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How does test-driven development prevent bugs in agile projects?

Test-driven development prevents bugs by enforcing a rigorous Red-Green-Refactor cycle, requiring a failing test before any production code is written to catch regressions early. This guarantees code reliability throughout development.

How do I apply the Red-Green-Refactor cycle when writing new features?

To apply the Red-Green-Refactor cycle, first write a failing test for the new functionality, then write minimal production code to make it pass, and finally refactor the code for quality. This ensures every feature has test coverage.

What is the best way to start TDD for a user authentication feature?

The best way to start TDD for user authentication is to write a failing test for a successful login scenario first. Once the test fails, write the minimal authentication code required to pass it, then refactor.

Can I use test-driven development for refactoring existing code?

Yes, you can use test-driven development for refactoring efforts. The workflow applies to refactoring by ensuring you write or verify failing tests first, make minimal code changes to pass them, and then safely improve the structure.

When should I not use test-driven development?

You should not use test-driven development when exploring experimental code spikes or building throwaway prototypes where immediate reliability and regression prevention are not required. TDD is designed for committed production code.