tdd

Guide test-first development through red-green-refactor cycles.

Updated May 31, 2026
One-click install
npx skills add https://github.com/anonymousminati/Res-POS --skill tdd-anonymousminati
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/anonymousminati/Res-POS/tree/main/.claude/skills/tdd
Command: npx skills add https://github.com/anonymousminati/Res-POS --skill tdd-anonymousminati

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you build and fix software with a disciplined test-first workflow, reducing regressions and making behavior easier to verify.

Core Features & Use Cases

  • Behavior-focused testing: Plans tests around public interfaces and observable outcomes rather than implementation details.
  • Red-green-refactor workflow: Guides you through one test at a time, then minimal code changes, then clean refactoring after the code is green.
  • Practical development support: Useful for feature work, bug fixes, integration tests, and improving testability with dependency injection and small interfaces.

Quick Start

Use the tdd skill to help me define the first behavior to test and walk me through one red-green-refactor cycle.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I start writing behavior-focused tests before implementing new features?

Behavior-focused testing plans tests around public interfaces and observable outcomes first. You define the expected behavior, write one test at a time, then implement minimal code changes to make it pass.

What is the red-green-refactor workflow for test-first development?

The red-green-refactor workflow guides you through writing one failing test, making minimal code changes to pass it, then safely cleaning up the code. This incremental loop reduces regressions and verifies behavior.

How do I fix bugs using a test-driven development approach?

Test-driven bug fixing involves writing a test that reproduces the bug first, confirming it fails, then applying minimal code changes to make it pass. This ensures the fix is verified and prevents future regressions.

Can I use this approach for integration tests and refactoring existing code?

Yes, this approach applies to integration testing and incremental refactoring. It emphasizes dependency injection and small interfaces to design refactor-safe tests that verify observable outcomes across software projects.

When should I avoid writing tests around implementation details?

You should avoid testing implementation details when building refactor-safe test designs. Focus tests on public interfaces and observable outcomes instead, ensuring that internal refactoring does not break existing behavior verification.