agent-skills-test-driven-development

Guides test-driven development with RED-GREEN-REFACTOR cycles and bug reproduction tests.

Updated Jul 9, 2026
One-click install
npx skills add https://github.com/assafmanor/waypoint --skill agent-skills-test-driven-development-assafmanor
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agent-skills-test-driven-development
Source: https://github.com/assafmanor/waypoint/tree/main/.claude/skills/agent-skills-test-driven-development
Command: npx skills add https://github.com/assafmanor/waypoint --skill agent-skills-test-driven-development-assafmanor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code changes made without tests ship unverified behavior, and bug fixes without reproduction tests leave regressions undetected. This Skill enforces a write-the-failing-test-first workflow so every behavior change is proven by an executable test. ## Core Features & Use Cases - RED-GREEN-REFACTOR Cycle: Write a failing test, implement the minimal code to pass it, then refactor with tests staying green. - Prove-It Pattern for Bugs: Reproduce any reported bug with a failing test before attempting a fix, guaranteeing the fix actually works. - Test Quality Guidance: Covers the test pyramid, DAMP vs DRY, state-based assertions over mocks, and anti-patterns to avoid. - Use Case: A bug report says completing a task doesn't set its timestamp. Write a failing test that asserts completedAt is set, watch it fail, implement the fix, and confirm the test passes with no regressions in the full suite. ## Quick Start Use test-driven development to implement this feature, starting with a failing test before writing any implementation code.

Frequently Asked Questions about agent-skills-test-driven-development

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

FAQPage Schema
How do I practice test-driven development when fixing a bug?▼

Write a test that reproduces the bug first and confirm it fails, then implement the fix and confirm the test passes. This Prove-It Pattern guarantees the bug existed, the fix works, and a regression guard remains in the suite.

What is the RED-GREEN-REFACTOR cycle in TDD?▼

RED means writing a failing test for the desired behavior, GREEN means writing the minimal code to make it pass, and REFACTOR means cleaning up the implementation while keeping tests green. The cycle repeats for each new behavior.

Should I use mocks or real implementations in unit tests?▼

Prefer real implementations first, then fakes, stubs, and finally interaction mocks as a last resort. Mock only when the real dependency is too slow, non-deterministic, or has uncontrollable side effects like external APIs or email sending.

When should I not write tests for a change?▼

Skip tests only for pure configuration changes, documentation updates, or static content with no behavioral impact. Any change to logic, behavior, or edge case handling should be covered by a test.

Why do my tests break every time I refactor code?▼

Tests that assert on internal method calls or implementation details break during refactoring even when behavior is unchanged. Assert on inputs and outputs (state-based testing) instead of interaction sequences.