0x2e/dev-skills/test-driven-development
Claude Code and agent skill by 0x2e/dev-skills
- community
Checking that the SKILL.md file is still in the repository.
Use when implementing features or fixing bugs that need test coverage — Red (write failing test first) → Green (minimal code to pass) → Refactor. Use for any task where tests prevent regressions.
Install
npx vskill@latest install 0x2e/dev-skills/test-driven-developmentSKILL.md
The same SKILL.md was published earlier as 0x2e/dev-skills/test-driven-development.
Test-Driven Development
Guide implementation through the Red-Green-Refactor cycle.
The Core Rule
If you wrote code before the test, delete it and start over.
The Cycle
RED — Write Failing Test
Write one test for one behavior.
Verify RED — Watch It Fail
Mandatory. Never skip.
Run the test and confirm:
- Test fails (not errors — failure means the assertion ran but the feature is missing)
- Fails for the right reason (feature missing, not typo or setup error)
Test passes immediately? It's testing existing behavior — fix the test.
GREEN — Write Minimal Code
Write the simplest code to pass the test. Nothing more. Don't add features, refactor other code, or "improve" beyond what the test requires — that's for the refactor step.
Verify GREEN — Watch It Pass
Mandatory.
Run the test and confirm: test passes, other tests still pass, no warnings or errors.
REFACTOR — Clean Up
After green only: remove duplication, improve names, extract helpers, simplify structure. Keep tests green throughout. Don't add new behavior during refactor.
Workflow
- Red: Write a test for the first acceptance criterion, run and see it fail
- Green: Write the minimal code to make it pass, run and see it pass
- Refactor: Clean up while keeping tests green
- Repeat for each acceptance criterion
- Run the full test suite to check for regressions
Bug Fix TDD
- Write a failing test that reproduces the bug
- Verify the test fails (confirms the bug exists)
- Write the fix to make the test pass
- Verify all tests pass
Never fix a bug without a test that reproduces it first.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/test-driven-development/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/0x2e/dev-skills/test-driven-development)