tdd · brianlovin — Claude Code skill: what it does, how to install
Guides agents through a disciplined red-green-refactor loop. It builds features one vertical slice at a time and tests public behavior over implementation details.
npx skills add brianlovin/agent-config --skill tdd -a claude-codeWhat tdd does
This skill enforces a strict test-driven workflow. Instead of generating dozens of tests upfront, the agent plans the public interface with you, identifies critical behaviors, and writes a single failing test. It then writes just enough code to make that test pass before moving on.
The workflow explicitly blocks horizontal slicing, where one writes all tests first and all code second. Tests target public APIs rather than internal methods or direct database state. Because tests ignore internal structure, later code changes will not break them.
Refactoring is permitted only after reaching green status. Touching code architecture while tests remain red is forbidden.
What it helps with
- design testable public interfaces before implementation
- verify end-to-end flows with minimal tracer bullet tests
- keep tests working during internal code refactors
- add features incrementally without speculative code
Example prompts for the agent
- Build the shopping cart checkout using TDD and red-green-refactor
- Fix the discount calculation bug test-first
- Create integration tests for the user registration endpoint
How to install tdd
1Skills CLI (Vercel)
npx skills add brianlovin/agent-config --skill tdd -a claude-code2Manually: put the files in place
~/.claude/skills/tdd/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/tdd/
1Skills CLI (Vercel)
npx skills add brianlovin/agent-config --skill tdd -a codex2Manually: put the files in place
.agents/skills/tdd/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add brianlovin/agent-config --skill tdd -a cursor2Manually: put the files in place
.cursor/skills/tdd/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install brianlovin/agent-config tdd2Manually: put the files in place
.github/skills/tdd/SKILL.md1Skills CLI (Vercel)
npx skills add brianlovin/agent-config --skill tdd -a gemini-cli2Platform CLI
gemini skills install https://github.com/brianlovin/agent-config --path skills/tddManually: put the files in place
.devin/skills/tdd/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add brianlovin/agent-config --skill tdd -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about tdd
How to install tdd in Claude Code?
Run npx skills add brianlovin/agent-config --skill tdd -a claude-code in your terminal.
What does the tdd skill do?
It directs the coding agent through vertical TDD cycles, pairing each individual failing test with minimal code before refactoring.
Why does the skill discourage writing all tests upfront?
Writing tests in bulk tests speculative structure rather than real system behavior. Incremental cycles allow each test to adapt to what the previous step revealed.
Similar skills
Everything for Testing and QA →tdd by other authors comes first.