
Test Driven Development
Write tests first, then code. Enforces TDD with spec, task, or ad-hoc modes.
What You Can Do
You can enforce test-first development across multiple entry points: parse acceptance criteria from spec files and generate test stubs, extract requirements from task files and design test scenarios, or write tests from ad-hoc descriptions. Claude guides you through the complete TDD cycle—RED (failing tests), GREEN (minimal implementation), and REFACTOR (clean code)—while leveraging your existing repository patterns and providing proptest guidance for property-based testing.
Features
spec files with Given/When/Then criteria, task files with requirements, or free-form descriptions
Example Output
From Spec Mode:
/// Spec: authentication.spec.md — Criterion #1
/// Given a user with valid credentials
/// When login is called
/// Then the session token is returned
#[test]
fn authentication_criterion_1_valid_login() {
todo!("Implement: the session token is returned");
}
From Task Mode:
Test scenarios extracted from .code-task.md: normal path (valid input → success), edge case (empty input → validation error), error condition (DB timeout → retry with backoff)
From Description Mode: Prompt: "Add file upload with size validation." → Generated tests: file under limit passes, oversized file rejected, zero-byte file handled
What's Included
- SKILL.md: Complete TDD workflow instruction with three input mode handlers
- Test stub templates: Rust test stubs with Given/When/Then comment structure
- Pattern discovery framework: Guides to identify repository and async patterns in your codebase
- Proptest checklist: Property-based testing strategy guide with shrinking examples
- TDD cycle verification: Compilation and test run commands to confirm RED and GREEN states
Who It's For
- QA engineers — Design comprehensive test scenarios before implementation
- Backend engineers — Enforce test-first Rust development with async/concurrent code
- Test automation engineers — Generate test stubs from specs and requirements in bulk
- DevOps engineers — Write infrastructure tests following TDD discipline
- Team leads — Ensure consistent TDD adoption across codebases
Best For
- Converting acceptance criteria (Given/When/Then) into failing test stubs
- Designing test scenarios from task descriptions with edge cases and error paths
- Property-based testing strategy for exhaustive input validation
- Refactoring existing code with tests written first
- Onboarding new team members into TDD workflows and repository patterns






