test-driven-development

Enforces red-green-refactor test-driven development workflow before writing implementation code.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developers often write production code first and bolt tests on afterward, which produces tests that pass immediately and prove nothing about correctness. This Skill enforces a strict test-first discipline so every behavior change is verified by a test that was watched failing before implementation. ## Core Features & Use Cases - Red-Green-Refactor Enforcement: Guides the full cycle of writing a failing test, verifying the failure, writing minimal passing code, and refactoring while staying green. - Rationalization Countermeasures: Provides a catalog of common excuses for skipping TDD (e.g., "too simple to test", "I'll test after") with concrete rebuttals and red flags that trigger a restart. - Test Quality Rules: The bundled writing-good-tests.md reference defines how to name the break each test catches, derive expectations independently, and mock at the right level. - Use Case: When fixing a bug where an empty email is accepted, write a failing test asserting the rejection error, watch it fail, implement the minimal validation, and confirm the suite passes. ## Quick Start Ask the assistant to implement a new feature or bugfix using strict test-driven development with a failing test written first.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I practice test-driven development on a new feature?▼

Write one minimal failing test describing the desired behavior, run it to confirm it fails for the right reason, then write the simplest code that passes. Refactor only while tests stay green, then repeat the cycle for the next behavior.

How do I write a failing test for a bug fix?▼

Reproduce the bug as a test asserting the correct behavior, such as expecting an error for empty email input. Run it to watch it fail against current code, then implement the minimal fix and confirm the test passes.

When is it acceptable to skip test-driven development?▼

Exceptions are limited to throwaway prototypes, generated code, and configuration files, and only with explicit approval from your human partner. Exploration is allowed, but the exploratory code must be discarded before restarting with TDD.

Why should tests be written before implementation code?▼

Tests written after implementation pass immediately, which proves nothing about whether they catch real bugs. Watching a test fail first confirms it tests the right behavior and is not biased by code already written.

When should I use mocks in unit tests?▼

Mock only slow or external dependencies after learning the real method's side effects, and keep everything the test depends on real. Never assert on the mock itself; assert the real component's observable behavior.