tdd

Drive feature implementation through test-first red-green-refactor cycles.

1|Updated Jul 13, 2026
One-click install
npx skills add https://github.com/vh2224/forge-executor --skill tdd-vh2224
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/vh2224/forge-executor/tree/main/src/resources/skills/tdd
Command: npx skills add https://github.com/vh2224/forge-executor --skill tdd-vh2224

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you implement software with test-driven development so each behavior is proven before the code is considered done. It reduces regressions, clarifies requirements, and keeps implementation focused on observable outcomes instead of guesswork.

Core Features & Use Cases

  • Red-Green-Refactor Workflow: Write one failing test, make it pass with minimal code, then clean up while the suite stays green.
  • Behavior-Focused Testing: Validate public interfaces and user-visible contracts instead of private implementation details.
  • Vertical Slice Development: Build features incrementally, one tracer bullet at a time, rather than writing all tests upfront.
  • Use Case: A developer adding an API endpoint can use this Skill to pin the happy path first, then add error cases, and finally refactor safely with full test coverage.

Quick Start

Use the tdd skill to guide me through implementing this feature with one red-green-refactor cycle per observable behavior.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I use test-driven development to implement a new API endpoint?

Test-driven development for an API endpoint involves writing a failing behavior-level test for the happy path, implementing minimal code to pass it, and then refactoring safely. You incrementally add error cases as separate red-green-refactor cycles to ensure full test coverage.

What is the red-green-refactor workflow in software development?

The red-green-refactor workflow is a test-driven development cycle where you write one failing test, make it pass with minimal implementation code, and then clean up the design while keeping the test suite green. This proves each behavior before considering the code done.

Should I write unit tests for private implementation details?

You should not write unit tests for private implementation details. Behavior-focused testing validates public interfaces and user-visible contracts instead, ensuring your tests remain durable through safe refactoring and do not break during internal structural changes.

Can I use test-driven development for fixing software bugs?

Test-driven development is highly effective for fixing software bugs. You write a behavior-level test that reproduces the bug and fails under current code, then apply the minimal fix to make it pass, preventing future regressions and clarifying the exact requirements.

When should I not use test-driven development for feature implementation?

Test-driven development is less suited for tasks lacking clear public contracts or observable behavior. If a software task involves exploratory implementation without defined module boundaries or pure functions, writing behavior-level tests upfront becomes difficult and unproductive.

Does the tdd skill guide vertical slice development?

The tdd skill guides vertical slice development by building features incrementally, one tracer bullet at a time, rather than writing all tests upfront. It drives feature implementation through test-first cycles around observable behavior for pure functions and module boundaries.