tdd
Writes a failing test first when a bug has a cheap local test target, and skips it when the test path is unclear.
- Kind
- Skill
- Works with
- Cursor, Any agent
- Source
- cursor/plugins @ 9580c23696ac
- Path
- pstack/skills/tdd/SKILL.md
- License
- MIT
- Jobs
- Testing
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
# TDD Bug Fix When fixing a bug with a clear, cheap test path, make the broken behavior executable before changing production code. The goal is a focused regression test that fails before the fix and passes after it. Do not force a test when it would be impractical. If the available test would require broad harness setup, brittle mocks, slow end-to-end infrastructure, production-only state, vague reproduction steps, or large unrelated fixture churn, skip adding a new test and use the closest useful verification instead. ## Workflow 1. **Understand the bug.** Identify the intended behavior, current behavior, affected path, and smallest observable reproduction. 2. **Choose the narrowest executable check.** Prefer the closest unit, component, integration, or regression test already used for that codepath. If no practical test path is obvious, do not create one from scratch just to satisfy the workflow. 3. **Write the failing test first.** Add the smallest focused test that would have caught the bug. The test should encode intended behavior, not mirror the current implementation. …