Agent skill
tdd-workflow
Test-Driven Development workflow with TDD commit convention, compliance tracking, and validation
Install this agent skill to your Project
npx add-skill https://github.com/vineethsoma/agent-packages/tree/main/skills/tdd-workflow
SKILL.md
TDD Workflow
Apply Test-Driven Development discipline with Red → Green → Refactor cycle, TDD commit convention, and compliance tracking.
What This Skill Provides
- TDD compliance checklist: Track TDD discipline throughout story
- TDD commit convention: 🔴🟢♻️ emoji pattern for Red → Green → Refactor
- Metrics gathering: Collect coverage, test counts, commit patterns
- Validation: Verify TDD compliance before merge
- AI-guided verification: Review TDD discipline and test quality
When to Use
- Starting story implementation (initialize checklist)
- Throughout development (track TDD discipline)
- Before merge (validate compliance)
- In code review (verify test-first approach)
Quick Start
1. Initialize TDD Checklist
```bash
From project root
./scripts/init-tdd-checklist.sh us-001 ```
Creates: ``` specs/{feature}/stories/us-001/checklists/ └── tdd-compliance.md ← Track TDD discipline ```
2. Follow TDD Commit Convention
Red → Green → Refactor Cycle:
```bash
🔴 RED: Write failing test
git add backend/tests/users.test.ts git commit -m "🔴 Test: POST /api/users validates email format"
�� GREEN: Implement to pass
git add backend/src/api/users.ts git commit -m "🟢 Implement email validation in createUser"
♻️ REFACTOR: Improve code quality
git add backend/src/api/users.ts backend/src/utils/validation.ts git commit -m "♻️ Extract email validation to reusable utility" ```
Emoji Guide:
- 🔴 `:red_circle:` - Failing test (Red phase)
- 🟢 `:green_circle:` - Passing implementation (Green phase)
- ♻️ `:recycle:` - Refactoring (Refactor phase)
3. Gather TDD Metrics
```bash ./scripts/gather-tdd-metrics.sh us-001 ```
Collects:
- TDD commit counts (🔴🟢♻️)
- Test coverage (backend, frontend)
- Test-to-code ratio
- Test file counts
4. Validate Before Merge
```bash ./scripts/validate-tdd-compliance.sh us-001 ```
Checks:
- All checklist items completed
- Coverage ≥ 80%
- TDD commit pattern detected (🔴→🟢)
- No skipped or commented tests
Exit code 0 = passed, 1 = failed.
TDD Commit Convention Details
See TDD discipline instructions for full details on commit convention enforcement.
Integration with Other Skills
- Task-delegation: TDD compliance tracked per delegation
- Feature-orchestration: TDD checklist in story checklists/ directory
- Retrospective-workflow: TDD metrics included in retro
- CLAUDE-framework: TDD is part of coding standards
Scripts
- `init-tdd-checklist.sh ` - Initialize TDD compliance checklist
- `gather-tdd-metrics.sh ` - Collect TDD metrics
- `validate-tdd-compliance.sh ` - Verify compliance (exit 0/1)
Prompts
- `verify-tdd-compliance` - AI-guided TDD verification workflow
Templates
- `tdd-compliance.checklist.md` - TDD discipline tracking
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
mcp-specialist
MCP server lifecycle management, catalog maintenance, and agent tool provisioning Use when working with management, provision, server, specialist.
agent-package-manager
Agent for creating and managing APM agent packages with kebab-case naming enforcement Use when working with agent, compliance, create, lifecycle, manager.
docker-compose
Docker Compose management for orchestrating MCP servers and multi-container applications. Use when deploying MCP servers, managing container lifecycles, or configuring service dependencies.
retrospective-workflow
Systematic post-story retrospective process with automated metrics gathering, structured feedback collection, and Agent Package Manager handoff generation
vector-search
Semantic search using vector embeddings and similarity metrics. Apply when implementing search with embeddings (OpenAI, Sentence Transformers) or distance-based ranking. Covers cosine similarity, Euclidean distance, dot product, and threshold selection.
secure-development
Security best practices for production applications including PII protection, input validation, SQL injection prevention, XSS mitigation, and secure logging. Apply when handling user data, authentication, or external inputs.
Didn't find tool you were looking for?