tdd

Writes failing regression tests before fixing bugs with cheap local test targets.

Updated Aug 28, 2026
One-click install
npx skills add https://github.com/jeremybrasher/grokbot-skills --skill tdd-jeremybrasher
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/jeremybrasher/grokbot-skills/tree/main/collections/pstack/skills/tdd
Command: npx skills add https://github.com/jeremybrasher/grokbot-skills --skill tdd-jeremybrasher

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Bug fixes often ship without regression coverage, letting the same defect return later. This Skill enforces a disciplined red-green workflow: reproduce the bug as a failing executable test before touching production code, then verify the fix passes. ## Core Features & Use Cases - Failing-Test-First Workflow: Encodes the intended behavior as a focused regression test that fails before the fix and passes after it. - Intake and HOLD Gates: Stops and reports missing inputs (unnamed bug, no cheap test path, no edit authority) instead of guessing or inventing weak tests. - Impracticality Fallback: When a real test would need brittle mocks, slow end-to-end infrastructure, or broad fixture churn, it explicitly states why and uses the closest executable check instead. - Use Case: A user reports that a date parser returns the wrong day for leap years. The Skill writes a minimal failing unit test for the leap-year case, confirms it fails, applies the smallest fix, reruns the test, and reports both failing-before and passing-after evidence. ## Quick Start Ask the agent to fix this bug using TDD: write a failing regression test for the described behavior first, then make the smallest fix and show the passing test run.

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?▼

Identify the intended versus actual behavior, write the smallest test that encodes the intended behavior, confirm it fails, then make the smallest production change and rerun the test until it passes. Finish by running nearby validation such as adjacent tests, type checks, or lint.

When should I not write a failing test before a bug fix?▼

Skip the failing test when it would require broad harness setup, brittle mocks, slow end-to-end infrastructure, production-only state, or vague reproduction steps. State why the test is impractical and use the closest executable check, such as a targeted script or manual reproduction command.

What makes a regression test a bad test?▼

A bad test mostly asserts mocks, mirrors current implementation details, depends on timing or unrelated global state, or needs expensive infrastructure for a small fix. Prefer no new test over a bad test and use manual or scripted verification instead.

Why does the TDD workflow stop instead of proceeding with missing information?▼

The workflow requires a named bug, a candidate cheap test path, and authority to edit code before starting. When any input is missing it returns a HOLD describing the gap, because inventing inputs produces tests that encode guesses rather than intended behavior.

Can I change an existing test to match the current implementation?▼

No. Tests should encode intended behavior, not mirror a wrong implementation. Existing assertions are only weakened when the expected behavior has genuinely changed and the reason is confirmed and clear.