Agent skill
tdd
Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants test-first development, or requests TDD workflow.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/tdd-helderberto-skills
SKILL.md
Test-Driven Development
Philosophy
Tests verify behavior through public interfaces, not implementation. Good tests survive refactors.
See principles.md for testing philosophy and anti-patterns.
Workflow
1. Planning
- Confirm interface design with user
- List behaviors to test (prioritize critical paths)
- Get approval before writing code
2. Tracer Bullet
RED: Write first test → fails
GREEN: Minimal code to pass → passes
3. Incremental Loop
For each remaining behavior:
RED: Write next test → fails
GREEN: Minimal code to pass → passes
Rules:
- One test at a time
- Minimal code to pass
- No refactoring while RED
4. Refactor
Once all tests GREEN:
- Remove duplication
- Improve structure
- Tests must stay GREEN
Anti-Pattern: Horizontal Slices
DO NOT write all tests first, then all implementation. DO use vertical slices: one test → one implementation → repeat.
See examples.md for workflow demonstrations.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?