tdd

Writes failing regression tests before fixing bugs with clear test paths.

136|8|Updated May 9, 2026
One-click install
npx skills add https://github.com/Sma1lboy/rove --skill tdd-sma1lboy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/Sma1lboy/rove/tree/main/.agents/skills/pstack/skills/tdd
Command: npx skills add https://github.com/Sma1lboy/rove --skill tdd-sma1lboy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Bug fixes often ship without proof that the bug is actually resolved, letting the same defect regress later. This Skill enforces a test-driven workflow that reproduces the bug as a failing test before any production code changes, then verifies the fix makes it pass. ## Core Features & Use Cases - Failing-Test-First Workflow: Guides a seven-step process from understanding the bug through writing a failing regression test, fixing the code, and rerunning validation. - Pragmatic Test Selection: Chooses the narrowest executable check and explicitly skips test creation when it would require brittle mocks, heavy infrastructure, or broad fixture churn. - Evidence-Based Reporting: Requires naming the failing-before test, the passing-after run, and nearby validation in the final response. - Use Case: A user reports that a date parser returns the wrong day for leap years. The Skill writes a focused unit test that fails on the leap-year input, applies the minimal fix, and confirms the test now passes alongside adjacent test suites. ## Quick Start Ask the agent to fix a specific bug using TDD by writing a failing regression test first, then making the minimal code change until the test passes.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I fix a bug using test-driven development?▼

Write the smallest test that reproduces the bug and confirm it fails for the intended reason, then make the minimal production change until the test passes. Finish by running nearby tests, type checks, or lint to catch broader regressions.

When should I write a regression test for a bug fix?▼

Write one when the bug has a clear, cheap test target such as an existing unit or integration test path for that code. Skip it when the test would need heavy harness setup, brittle mocks, or slow end-to-end infrastructure.

What should I do if a failing test is impractical to write?▼

State explicitly why the failing test is not worth the cost, then use the closest executable check such as a targeted script, manual reproduction command, log assertion, or focused integration check. Prefer no new test over a brittle or misleading one.

Why does my regression test pass before the bug is fixed?▼

A test that passes before the fix does not reproduce the bug, so it provides no regression signal. Correct the test or the reproduction steps until it fails for the intended reason before editing any production code.

Should I change existing tests to match a bug fix?▼

Do not weaken or rewrite existing assertions just to match new behavior unless the expected behavior has genuinely changed and the reason is clear. Tests should encode intended behavior, not mirror the current implementation.