tdd
Enforce strict Test-Driven Development (TDD) using the red-green-refactor cycle.
Skill by MeroZemory
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/merozemory-tdd
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/tdd
What's inside
- Skill name
tdd- Description
- Enforce strict Test-Driven Development (TDD) using the red-green-refactor cycle. Use when writing unit tests, practicing test-first development, applying TDD discipline, or implementing features via red-green-refactor workflows.
- License
- MIT
- Instructions
- 139 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# TDD Mode
## 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
npx jest --watchAll # Should have ONE new failure
# or: npx vitest run, pytest, go test ./...
```
After implementation:
```bash
npx jest --watchAll # New test should pass, all others still pass
```
## Worked Example: Adding a `capitalize` Function
### RED Phase — Write the Failing Test
```js
// src/strings.test.js
const { capitalize } = require('./strings');
describe('capitalize', () => {
it('should uppercase the first letter and lowercase the rest', () => {
expect(capitalize('hello')).toBe('Hello');
});
it('should handle single character strings', () => {
expect(capitalize('h')).toBe('H');
});
it('should return empty string for empty input', () => {
expect(capitalize('')).toBe('');
});
});
```
Run tests — they fail because `strings.js` does not export `capitalize`:
```
FAIL src/strings.test.js
● capitalize › should uppercase the first letter and lowercase the rest
TypeError: capitalize is not a function
```
### GREEN Phase — Minimal Implementation
```js
// src/strings.js
function capitalize(str) {
if (!str) return '';
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
}
module.exports = { capitalize };
```
Run tests — all three pass:
```
PASS src/strings.test.js
capitalize
✓ should uppercase the first letter and lowercase the rest
✓ should handle single character strings
✓ should return empty string for empty input
```
### REFACTOR Phase — Clean Up
Extract a guard clause for clarity, ensure tests still pass:
```js
function capitalize(str) {
if (str.length === 0) return '';
return str[0].toUpperCase() + str.slice(1).toLowerCase();
}
```
Tests still green. Move to the next failing test.
## Output Format
When guiding TDD:From MeroZemory/oh-my-droid, MIT.
More from MeroZemory/oh-my-droid
- 0.553score
local-skills-setup
MeroZemory
Set up and manage local skills for automatic matching and invocation
SkillCFreshness: C★ 28Claude Code +9 - 0.553score
ralph-init
MeroZemory
Initialize a PRD (Product Requirements Document) for structured ralph-loop execution
SkillCFreshness: C★ 28Claude Code +9 - 0.553score
swarm
MeroZemory
N coordinated agents on shared task list with SQLite-based atomic claiming
SkillCFreshness: C★ 28Claude Code +9 - 0.553score
ralplan
MeroZemory
Iterative planning with Planner, Architect, and Critic until consensus
SkillCFreshness: C★ 28Claude Code +9 - 0.553score
project-session-manager
MeroZemory
Manage isolated dev environments with git worktrees and tmux sessions
SkillCFreshness: C★ 28Claude Code +9 - 0.550score
learner
MeroZemory
Extract a learned skill from the current conversation
SkillCFreshness: C★ 28Claude Code +9 - 0.549score
hud
MeroZemory
Configure HUD display options (layout, presets, display elements)
SkillCFreshness: C★ 28Claude Code +9 - 0.546score
skill
MeroZemory
Manage local skills - list, add, remove, search, edit
SkillCFreshness: C★ 28Claude Code +9 - 0.544score
omd-setup
MeroZemory
Setup and configure oh-my-droid (the ONLY command you need to learn)
SkillCFreshness: C★ 28Claude Code +9 - 0.494score
deepsearch
MeroZemory
Exhaustive multi-strategy codebase search using grep, ripgrep, find, and AST-aware tracing to locate implementations, references, dependencies, and usage…
SkillDFreshness: D★ 28Claude Code +9 - 0.494score
orchestrate
MeroZemory
Coordinate multi-agent task execution by delegating to specialist subagents, managing parallel workflows, and verifying completion through architect review.
SkillDFreshness: D★ 28Claude Code +9 - 0.494score
autopilot
MeroZemory
Expand a product idea into a spec, plan implementation with critic validation, execute code across parallel agents, run iterative QA cycles, and perform…
SkillDFreshness: D★ 28Claude Code +9
Signals
- Stars
- 28
- Forks
- 7
- Open issues
- 1
- Last commit (this folder)
- Apr 17, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/MeroZemory/oh-my-droid
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from MeroZemory
- 0.553score
ralplan
MeroZemory
Iterative planning with Planner, Architect, and Critic until consensus
SkillCFreshness: C★ 28Claude Code +9 - 0.553score
swarm
MeroZemory
N coordinated agents on shared task list with SQLite-based atomic claiming
SkillCFreshness: C★ 28Claude Code +9 - 0.553score
ralph-init
MeroZemory
Initialize a PRD (Product Requirements Document) for structured ralph-loop execution
SkillCFreshness: C★ 28Claude Code +9 - 0.553score
local-skills-setup
MeroZemory
Set up and manage local skills for automatic matching and invocation
SkillCFreshness: C★ 28Claude Code +9 - 0.553score
project-session-manager
MeroZemory
Manage isolated dev environments with git worktrees and tmux sessions
SkillCFreshness: C★ 28Claude Code +9 - 0.550score
learner
MeroZemory
Extract a learned skill from the current conversation
SkillCFreshness: C★ 28Claude Code +9
Cite this page
tdd skill. Agent Mart. https://agentmart.dev/skills/merozemory-tdd (last updated 2026-10-24)