Back to skills
SkillHub ClubShip Full StackFull StackTesting

tdd

Test-Driven Development enforcement skill - write tests first, always

Packaged view

This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.

Stars
10,031
Hot score
99
Updated
March 20, 2026
Overall rating
C4.8
Composite score
4.8
Best-practice grade
B84.0

Install command

npx @skill-hub/cli install yeachan-heo-oh-my-claudecode-tdd

Repository

Yeachan-Heo/oh-my-claudecode

Skill path: skills/tdd

Test-Driven Development enforcement skill - write tests first, always

Open repository

Best for

Primary workflow: Ship Full Stack.

Technical facets: Full Stack, Testing.

Target audience: everyone.

License: Unknown.

Original source

Catalog source: SkillHub Club.

Repository owner: Yeachan-Heo.

This is still a mirrored public skill entry. Review the repository before installing into production workflows.

What it helps with

  • Install tdd into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
  • Review https://github.com/Yeachan-Heo/oh-my-claudecode before adding tdd to shared team environments
  • Use tdd for development workflows

Works across

Claude CodeCodex CLIGemini CLIOpenCode

Favorites: 0.

Sub-skills: 0.

Aggregator: No.

Original source / Raw SKILL.md

---
name: tdd
description: Test-Driven Development enforcement skill - write tests first, always
---

# TDD Mode

[TDD MODE ACTIVATED]

## The Iron Law

**NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST**

Write code before test? DELETE IT. Start over. No exceptions.

## Red-Green-Refactor Cycle

### 1. RED: Write Failing Test
- Write test for the NEXT piece of functionality
- Run test - MUST FAIL
- If it passes, your test is wrong

### 2. GREEN: Minimal Implementation
- Write ONLY enough code to pass the test
- No extras. No "while I'm here."
- Run test - MUST PASS

### 3. REFACTOR: Clean Up
- Improve code quality
- Run tests after EVERY change
- Must stay green

### 4. REPEAT
- Next failing test
- Continue cycle

## Enforcement Rules

| If You See | Action |
|------------|--------|
| Code written before test | STOP. Delete code. Write test first. |
| Test passes on first run | Test is wrong. Fix it to fail first. |
| Multiple features in one cycle | STOP. One test, one feature. |
| Skipping refactor | Go back. Clean up before next feature. |

## Commands

Before each implementation:
```bash
npm test  # Should have ONE new failure
```

After implementation:
```bash
npm test  # New test should pass, all others still pass
```

## Output Format

When guiding TDD:

```
## TDD Cycle: [Feature Name]

### RED Phase
Test: [test code]
Expected failure: [what error you expect]
Actual: [run result showing failure]

### GREEN Phase
Implementation: [minimal code]
Result: [run result showing pass]

### REFACTOR Phase
Changes: [what was cleaned up]
Result: [tests still pass]
```

**Remember:** The discipline IS the value. Shortcuts destroy the benefit.
tdd | SkillHub