test-first
/test-first
Drive one feature through a strict TDD Red-Green-Refactor cycle with checklists for each phase. Use when implementing new functionality test-first, or when the user runs /test-first.
- Author
- claude-world ↗
- Repository
- director-mode-lite ↗
- Licence
- MIT
- Last repository change
- 21.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 21.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Drive one feature through a strict TDD Red-Green-Refactor cycle with checklists for each phase. Use when implementing new functionality test-first, or when the user runs /test-first.
Original author description
Drive one feature through a strict TDD Red-Green-Refactor cycle with checklists for each phase. Use when implementing new functionality test-first, or when the user runs /test-first.
How it works
- Quick Steps
- Red Phase - Write Failing Test
- Green Phase - Minimal Implementation
- Refactor Phase - Clean Up
- Test Quality Checklist
SKILL.md preview
---
name: test-first
description: Drive one feature through a strict TDD Red-Green-Refactor cycle with checklists for each phase. Use when implementing new functionality test-first, or when the user runs /test-first.
user-invocable: true
---
# Test-Driven Development
Implement TDD for: $ARGUMENTS
## Quick Steps
1. Write a failing test
2. Run test, confirm failure
3. Write minimal code to pass
4. Refactor while keeping tests green
5. Repeat
---
## Red Phase - Write Failing Test
### Test Design Principles
- **Test one specific behavior**
- **Test name describes expected result**
- **Test should fail (feature doesn't exist yet)**
### Must Test
- [ ] Normal case
- [ ] Edge cases
- [ ] Error cases
- [ ] Invalid input
### Example
```typescript
// auth/login.test.ts
it('should return JWT token for valid credentials', async () => {
const res = await request(app)
.post('/auth/login')
.send({ email: 'test@example.com', password: 'password123' })
expect(res.status).toBe(200)
expect(res.body.token).toBeDefined()
})
```
---
## Green Phase - Minimal Implementation
### Implementation Principles
- **Write ONLY enough code to pass the test**
- **Don't optimize yet**
- **Don't worry about elegance**
- **Just make it work**
---
## Refactor Phase - Clean Up
### Refactoring Checklist
- [ ] Is there code duplication?
- [ ] Are variable names clear?
- [ ] Are functions too long?
- [ ] Is the logic too complex?
### Refactoring Rules
- **Keep tests passing**
- **Change one thing at a time**
- **Run tests frequently**
---
## Test Quality Checklist
- [ ] Unit tests cover core logic
- [ ] Integration tests cover interactions
- [ ] Test names clearly describe intent
- [ ] Tests are independent and repeatable
- [ ] Tests run fast (unit tests < 100ms)
- [ ] Edge cases are covered
---
Follow TDD strictly. No shortcuts.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · claude-world/director-mode-lite | 100 | MIT |
| NoobyGains/godmode | 100 | MIT |
| tojim00d/Orbit-skills | 100 | MIT |
| Cynnamoroll/factory-stack | 100 | MIT |
| duthaho/claudekit | 100 | MIT |
| DemonPalace/DoneCheck | 90 | MIT |
Database snapshot: 13.11.2026 · package version e960094ac1b2 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100tdd
Enforces strict RED-GREEN-REFACTOR test-driven development — one failing test at a time, minimal code to pass, then refactor against an inline quality checklist and a test-provenance check (`provenance` runs it alone). Triggers on "tdd", "write tests", "test driven", "red green refactor", "/tdd". - 100tdd
Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development. - 100tdd
Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development. - 100tdd
Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions \"red-green-refactor\", wants integration tests, or asks for test-first development. - 96tdd-workflows-tdd-cycle
Use when working with tdd workflows tdd cycle - 96tdd-workflows-tdd-cycle
Use when working with tdd workflows tdd cycle