tdd
Skill4 starsChanged 11 months agoMITView on GitHub
Enforce Test-Driven Development when writing or modifying code. Use when implementing features, fixing bugs, or when the user asks to write code. Activates automatically for code changes unless user says "quick fix" or "no tdd".
193 other projects use a version of this.
Adopted by
Most recently taken up by
- mattpocock/skillstheir own version, first seen Oct 8, 2026
- rafaelob/pragmatic-agent-skillstheir own version, first seen Oct 5, 2026
- AlexisBalayre/claude-code-configtheir own version, first seen Oct 5, 2026
- KroxiDev/engineering-skillstheir own version, first seen Oct 5, 2026
- gaia-react/gaiatheir own version, first seen Oct 5, 2026
- uzairansaruzi/p3-stacktheir own version, first seen Oct 5, 2026
Used with
Projects with it also use make-bot-ui, Poteto Mode and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
eryzerzSkillmake-bot-ui
Use when building a custom UI (page, dashboard, buttons) that should wake a Grok Bot over a webhook, when the user must provide a webhook sender key, or when exposing that UI on Tailscale.
Also in 8 projects that use this
jtarorehSkillPoteto Mode
poteto's agent style for concise, detailed responses, deliberate subagents, unslopped prose, simple code, and verified work. Use for poteto, /poteto-mode, or requests to work in this style.
Also in 5 projects that use this
risadamsSkillwhich-skill
Router over this pack's skills and flows. Ask it "which skill fits X" when you don't remember what's available.
Also in 7 projects that use this
TheOnlyFusionCubeSkillprinciple-attack-the-premise
Inventory who actually owns or exhibits the imbalance, then challenge the shared premise before writing another patch. Use when two or more fixes that share one premise have failed the same gate.
Also in 11 projects that use this
TheOnlyFusionCubeSkillprinciple-test-behavior-not-implementation
Call the system the way its consumer does and assert meaningful observable output; avoid mocks or assertions that only mirror internal calls. Use when when writing or evaluating tests.
Also in 11 projects that use this
shreyT19Skillprinciple-laziness-protocol
Apply when refactoring, evaluating diff size, or tempted to add abstractions, layers, or signal threading. Bias toward deletion and the smallest change that solves the problem.
Also in 22 projects that use this
Other versions193 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 193
- mattpocock/skills★ 335ksame name
- Yeachan-Heo/oh-my-claudecode★ 40ksame name
- open-metadata/OpenMetadata★ 15ksame name
- vinvcn/mattpocock-skills-zh-CN★ 4.6ksame name
- parcadei/Continuous-Claude-v3★ 3.9ksame name
- rohitg00/pro-workflow★ 2.9ksame name
- crbnos/carbon★ 2.7ksame name
- codeaholicguy/ai-devkit★ 1.6ksame name
- backnotprop/pstack★ 991same name
- kdlbs/kandev★ 899same name
183 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
27 rules. 0 are common, 26 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 177 edited versions we read keep these.
26
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 49
If uncertain about mode, default to interactive
- Distinctive: line 51
When mode changes, confirm: "Switched to [mode] mode"
- Distinctive: line 60
Write just enough test code to fail
- Distinctive: line 67
Confirm RED: Test MUST fail
- Distinctive: line 68
If it passes: STOP - this is suspicious, discuss with user
- Distinctive: line 79
Write minimum code to pass - no more
- Distinctive: line 86
Confirm GREEN: Test MUST pass before proceeding
- Distinctive: line 90
Look for duplication (primary target)
- Distinctive: line 92
Interactive mode: Ask "Any refactoring before we commit?"
- Distinctive: line 95
If refactoring: Run tests again to ensure still GREEN
- Distinctive: line 99
Interactive mode: Wait for user confirmation before committing
- Distinctive: line 101
Batch mode: Commit automatically, user reviews at batch point
- Distinctive: line 103
Autonomous mode: Commit if Review skill found no blockers
- Distinctive: line 115
When in autonomous mode, invoke the Review skill after GREEN phase.
- Distinctive: line 127
When Review skill finds issues above threshold:
- Distinctive: line 129
Ask how to proceed:
- Distinctive: line 138
After completing an acceptance criterion:
- Distinctive: line 141
Ask user to review
- Distinctive: line 146
After completing all acceptance criteria:
- Distinctive: line 148
Run comprehensive Review skill scan
- Very specific: line 154
When invoked from /start-dev:
- Distinctive: line 158
Use review mode specified (or default to interactive)
- Distinctive: line 165
Write new code only if an automated test has failed
- Distinctive: line 169
No production code unless it makes a failing test pass
- Distinctive: line 170
No more test code than sufficient to fail
- Distinctive: line 171
No more production code than sufficient to pass
- Distinctive: line 177
When uncertain, ask: - never proceed without clarity
“Common” is measured: kept by at least 6 in 10 of the 177 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
TDD Skill
Enforce Red-Green-Refactor discipline for all code changes.
When This Skill Activates
- User asks to implement a feature
- User asks to fix a bug
- User asks to write or modify code
/start-devdelegates Phase 3 to this skill
When This Skill Does NOT Activate
- User says "quick fix" or "no tdd"
- Pure refactoring with no behavior change (user specifies)
- Documentation-only changes
Review Modes
Mode determines when user reviews your work. Default is interactive.
Changing Modes
User can say:
use interactive- review each cycle (default)use batch-ac- review after each acceptance criterionuse batch-story- review after all acceptance criteriause autonomous strict- agent reviews, flags any code smelluse autonomous normal- agent reviews, flags significant issuesuse autonomous relaxed- agent reviews, flags blockers only
Mode Behavior
| Mode | Review Point | Best For |
| Interactive | After each Red-Green cycle | Learning, complex logic, unfamiliar code |
| Batch AC | After completing an acceptance criterion | Moderate oversight, well-understood domain |
| Batch Story | After all acceptance criteria complete | Maximum flow, trusted patterns |
| Autonomous | Agent reviews continuously | Speed with quality gates |
Mode Persistence
- Remember the current mode throughout the conversation
- If uncertain about mode, default to interactive
- Acknowledge mode on each cycle: "Running in [mode] mode..."
- When mode changes, confirm: "Switched to [mode] mode"
The Red-Green-Refactor Workflow
For each piece of functionality:
RED: Write a Failing Test
- Identify the smallest next piece of functionality
- Write just enough test code to fail
- Interactive/Batch: Show the test, explain what it tests
- Autonomous: Proceed without showing
- Run the test:
./gradlew test - Confirm RED: Test MUST fail
- If it passes: STOP - this is suspicious, discuss with user
GREEN: Make it Pass
- Choose a technique:
Technique When How Fake It Unsure of implementation Return constant, replace with variables later Obvious Implementation Know exactly what to type Write real implementation directly Triangulation Design unclear Add test cases to reveal pattern - Write minimum code to pass - no more
- Interactive/Batch: Show the implementation
- Autonomous: Proceed without showing
- Run the test:
./gradlew test - Confirm GREEN: Test MUST pass before proceeding
REFACTOR: Clean Up
- Look for duplication (primary target)
- Apply clean code principles
- Interactive mode: Ask "Any refactoring before we commit?"
- Batch mode: Note refactoring opportunities, continue
- Autonomous mode: Invoke Review skill, act on findings based on threshold
- If refactoring: Run tests again to ensure still GREEN
COMMIT
Interactive mode: Wait for user confirmation before committing
Batch mode: Commit automatically, user reviews at batch point
Autonomous mode: Commit if Review skill found no blockers
git add -A && git commit -m "<descriptive message> #<issue-number>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>"Autonomous Mode Details
When in autonomous mode, invoke the Review skill after GREEN phase.
Threshold Behavior
| Threshold | Interrupt For | Continue If |
| Strict | Any finding (blocker, warning, suggestion) | No findings at all |
| Normal | Blockers and warnings | Only suggestions |
| Relaxed | Blockers only | Warnings and suggestions OK |
On Interrupt
When Review skill finds issues above threshold:
- Show the findings to user
- Ask how to proceed:
- Fix now
- Ignore and continue
- Switch to interactive mode
Batch Review Points
Batch AC Mode
After completing an acceptance criterion:
- Show summary of all changes made
- Show cumulative Review skill findings (if any)
- Ask user to review
- Address feedback before next criterion
Batch Story Mode
After completing all acceptance criteria:
- Show full summary of implementation
- Run comprehensive Review skill scan
- Present findings by category
- Address feedback before marking story complete
Integration with /start-dev
When invoked from /start-dev:
- Story context is already established
- Acceptance criteria are defined
- Work through criteria one by one
- Use review mode specified (or default to interactive)
Key Principles
From docs/context/testing.md:
Kent Beck's Two Rules
- Write new code only if an automated test has failed
- Eliminate duplication
The Three Laws (Uncle Bob)
- No production code unless it makes a failing test pass
- No more test code than sufficient to fail
- No more production code than sufficient to pass
Remember
- No code without a failing test first - non-negotiable
- Tests must actually run - "this would fail" doesn't count
- Small steps - each test covers one small piece
- When uncertain, ask - never proceed without clarity
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

