Master Test-Driven Development with deterministic red-green-refactor workflows, test-first feature delivery, bug reproduction through failing tests, behavior-focused assertions, and refactoring safety; use when implementing new functions, changing APIs, fixing regressions, or restructuring code under test.
Does it follow best practices?
Evaluation — 86%
↑ 1.05xAgent success when using this tile
Validation for skill structure
Each red-green-refactor cycle should take seconds to minutes, not hours. Small steps provide rapid feedback, reduce debugging time, and make it easy to identify what broke.
Incorrect (giant leaps):
// One massive test covering entire feature
test('user registration with validation and email', async () => {
const result = await registerUser({
email: 'test@example.com',
password: 'SecurePass123!',
name: 'John Doe'
})
expect(result.success).toBe(true)
expect(result.user.email).toBe('test@example.com')
expect(result.user.emailVerified).toBe(false)
expect(emailService.sendVerification).toHaveBeenCalled()
expect(await database.users.findByEmail('test@example.com')).toBeDefined()
})
// Then write hundreds of lines to make it pass
// When it fails, unclear which part is brokenCorrect (baby steps):
// Step 1: User can be created
test('creates user with email and name', () => {
const user = createUser({ email: 'test@example.com', name: 'John' })
expect(user.email).toBe('test@example.com')
})
// Implement, refactor, commit
// Step 2: Password validation
test('rejects weak passwords', () => {
expect(() => createUser({
email: 'test@example.com',
password: '123'
})).toThrow('Password too weak')
})
// Implement, refactor, commit
// Step 3: Email verification flag
test('new users start with unverified email', () => {
const user = createUser({ email: 'test@example.com', name: 'John' })
expect(user.emailVerified).toBe(false)
})
// Implement, refactor, commit
// Each step: ~30 seconds to 2 minutesBenefits of small steps:
Reference: The Cycles of TDD - Clean Coder Blog
Install with Tessl CLI
npx tessl i pantheon-ai/test-driven-development@0.2.4evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
references