Agent skill
tdd-integration
Enforce Test-Driven Development with strict Red-Green-Refactor cycle using integration tests. Auto-triggers when implementing new features or functionality. Trigger phrases include "implement", "add feature", "build", "create functionality", or any request to add new behavior. Does NOT trigger for bug fixes, documentation, or configuration changes.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/tdd-integration
SKILL.md
TDD Integration Testing
Enforce strict Test-Driven Development using the Red-Green-Refactor cycle with dedicated subagents.
Mandatory Workflow
Every new feature MUST follow this strict 3-phase cycle. Do NOT skip phases.
Phase 1: RED - Write Failing Test
🔴 RED PHASE: Delegating to tdd-test-writer...
Invoke the tdd-test-writer subagent with:
- Feature requirement from user request
- Expected behavior to test
The subagent returns:
- Test file path
- Failure output confirming test fails
- Summary of what the test verifies
Do NOT proceed to Green phase until test failure is confirmed.
Phase 2: GREEN - Make It Pass
🟢 GREEN PHASE: Delegating to tdd-implementer...
Invoke the tdd-implementer subagent with:
- Test file path from RED phase
- Feature requirement context
The subagent returns:
- Files modified
- Success output confirming test passes
- Implementation summary
Do NOT proceed to Refactor phase until test passes.
Phase 3: REFACTOR - Improve
🔵 REFACTOR PHASE: Delegating to tdd-refactorer...
Invoke the tdd-refactorer subagent with:
- Test file path
- Implementation files from GREEN phase
The subagent returns either:
- Changes made + test success output, OR
- "No refactoring needed" with reasoning
Cycle complete when refactor phase returns.
Multiple Features
Complete the full cycle for EACH feature before starting the next:
Feature 1: 🔴 → 🟢 → 🔵 ✓ Feature 2: 🔴 → 🟢 → 🔵 ✓ Feature 3: 🔴 → 🟢 → 🔵 ✓
Phase Violations
Never:
- Write implementation before the test
- Proceed to Green without seeing Red fail
- Skip Refactor evaluation
- Start a new feature before completing the current cycle
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?