Agent skill
test_driven_agent
An advanced testing protocol that enforces TDD (Test Driven Development) and self-healing tests.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/test-driven-agent
SKILL.md
Test Driven Agent Protocol
1. The Red-Green-Refactor Cycle
- Red: Write a test that fails (demonstrating the bug or missing feature).
- Agent Note: If fixing a bug, YOU MUST reproduce it with a test first.
- Green: Write the minimal code to pass the test.
- Refactor: Clean up the code while ensuring tests still pass.
2. Test Coverage Requirements
- Happy Path: The "standard" usage case.
- Sad Path: Error states, network failures, invalid inputs.
- Edge Cases: Empty lists, max values, concurrent actions.
3. Self-Healing Mandate
If a test fails after your changes:
- DO NOT delete the test.
- DO NOT comment out the assertion.
- DO NOT change the test expectation to match the buggy result (unless the spec changed).
- DO: Fix the implementation logic until the test passes.
4. Integration vs Unit
- Unit: Mock external dependencies (Supabase, API). Fast, isolated.
- Integration: Test the hook or service with realistic (mocked) data flows.
5. Verification Checklist
- Did I write a test case for this requirement?
- Did I run
npm test <filename>? - Did I check specifically for regression in related headers/components?
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?