---
name: tdd-workflow
description: ALWAYS use this when a bug fix or logic change should be locked down by tests first, especially when regression risk is higher than the cost of writing focused tests.
TDD Workflow
Selective Reading Rule
Start with:
references/usage-routing.md
references/quality-checklist.md
Then load only the inherited docs, scripts, assets, or examples that match the user's actual task.
Selective Reading Rule
Start with:
references/senior-master-standard.md
Start with references/tdd-decision-guide.md.
Use it to decide whether to stay with focused TDD, shift to broader integration tests, or explicitly avoid forcing TDD on the task.
Purpose
Keep test-first discipline practical, not ceremonial.
Workflow
Decide whether the behavior is test-definable right now.
Write the failing proof.
Implement the narrowest passing change.
Refactor while staying green.
Widen checks only after the focused proof is stable.
Rules
If the bug can be reproduced, capture it in a test before fixing it.
If setup cost is huge, shrink the seam instead of abandoning proof too early.
If the work is mostly visual exploration, say so and use a different skill.
1---2name: tdd-workflow3description: ---4---5---6name: tdd-workflow7description: ALWAYS use this when a bug fix or logic change should be locked down by tests first, especially when regression risk is higher than the cost of writing focused tests.8---910# TDD Workflow1112## Selective Reading Rule1314Start with:1516- `references/usage-routing.md`17- `references/quality-checklist.md`1819Then load only the inherited docs, scripts, assets, or examples that match the user's actual task.2021## Selective Reading Rule2223Start with:2425- `references/senior-master-standard.md`262728Start with `references/tdd-decision-guide.md`.2930Use it to decide whether to stay with focused TDD, shift to broader integration tests, or explicitly avoid forcing TDD on the task.3132## Purpose3334Keep test-first discipline practical, not ceremonial.3536## Workflow37381. Decide whether the behavior is test-definable right now.392. Write the failing proof.403. Implement the narrowest passing change.414. Refactor while staying green.425. Widen checks only after the focused proof is stable.4344## Rules4546- If the bug can be reproduced, capture it in a test before fixing it.47- If setup cost is huge, shrink the seam instead of abandoning proof too early.48- If the work is mostly visual exploration, say so and use a different skill.
Run npx skillmds@latest add anhvu1107/tdd-workflow in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
--- It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
anhvu1107 (@anhvu1107) published this skill. Their other Agent Skills are listed on their SkillMD profile.