claude/skills/tdd/SKILL.md
TDD workflow - Write a failing test, then implement Super Green
npx skillsauth add b-galati/dotfiles tddInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are executing a TDD workflow - a two-step process that leverages AI synthesis capabilities to produce clean, production-ready code without an intermediate "quick and dirty" phase.
We will implement the behavior iteratively, one step at a time. The user will guide you for each step. Your role is to write failing tests and implement Super Green. DO NOT try to implement all behavior at once. DO NOT try to plan to write any code until STEP 2 is Reached. Start by writing failing tests.
Red → Super Green
AI synthesizes clean, architectural code directly - no crappy code phase needed.
Compilation errors are NOT RED - they are part of design discovery ("Programming by Wishful Thinking"). When writing tests, you design the API you wish existed.
TRUE RED = Behavior failure once the wished-for API compiles and runs.
Class 'App\Domain\UseCase\Foo\Input' not foundMethod Bar::doSomething() does not existFailed asserting that 'actual' equals 'expected'ExpectedException was not thrownSuper Green means implementing clean, production-ready code that:
Input Required: $ARGUMENTS
Analyze the Specification
Ask Where to Write the Test
Design the API via Programming by Wishful Thinking
Write the Test File
Reach TRUE RED
RED Phase Report Format:
══════════════════════════════════════════════════════════════
🔴 RED PHASE COMPLETE
══════════════════════════════════════════════════════════════
📝 Test File: <path>
🎯 Behavior Under Test: <description>
❌ Failure Message: <actual test failure>
🏗️ Stub Files Created (compilation only):
- <list of minimal stubs>
══════════════════════════════════════════════════════════════
After RED, pause and ask:
🏛️ ARCHITECTURAL GUIDANCE (Optional)
Before I implement Super Green, do you want to provide any architectural guidance?
Examples:
- "Use a Strategy pattern for the different validation rules"
- "Implement this as an event-driven saga"
- "Avoid any state mutation - use pure functions"
- "Use the existing PaymentGateway interface"
Options:
1. Proceed with standard architectural approach
2. Provide guidance: [your input]
With architectural guidance you know, implement the complete solution.
Then:
SUPER GREEN Phase Report Format:
══════════════════════════════════════════════════════════════
🟢 SUPER GREEN COMPLETE
══════════════════════════════════════════════════════════════
📝 Test: <test file>
✅ Status: PASSING
🏗️ Architectural Decisions:
- <key decision 1>
- <key decision 2>
══════════════════════════════════════════════════════════════
development
OpenAPI specification expert for creating, improving, and validating clear, self-documenting API specs. Use when designing, reviewing, or refactoring OpenAPI/Swagger specs for clarity, consistency, and usability.
testing
Implement behaviors from a specification file produced by the local-create-spec skill. Use when the user says 'implement behaviors from ...', 'implement the spec', 'implement spec ...', or wants to implement a .specs/ markdown file containing Given/When/Then behaviors with checkboxes.
tools
Implement a Linear issue by breaking its acceptance criteria into tasks, implementing each with TDD, and updating the Linear issue status when done. Use when the user says 'implement issue ...', 'implement TEAM-123', or wants to implement a Linear issue.
testing
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".