debugger
Systematic debugging methodology for diagnosing failures and root cause analysis. Triggers on: 2+ failed fix attempts,…
Systematic TDD methodology for writing tests first. Use when implementing features or fixes with OMC_TDD_MODE enabled, when unsure how to structure tests, or when test-first discipline needs reinforcement. Triggers on: 'tdd', 'test first', 'test driven', 'red green refactor'.
$ npx -y skills add TechDufus/oh-my-claude --skill tdd --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/tddContext preview
The summary Claude sees to decide when to auto-load this skill.
Systematic TDD methodology for writing tests first. Use when implementing features or fixes with OMC_TDD_MODE enabled, when unsure how to structure tests, or when test-first discipline needs reinforcement. Triggers on: 'tdd', 'test first', 'test driven', 'red green refactor'.
name: tdd description: "Systematic TDD methodology for writing tests first. Use when implementing features or fixes with OMC_TDD_MODE enabled, when unsure how to structure tests, or when test-first discipline needs reinforcement. Triggers on: 'tdd', 'test first', 'test driven', 'red green refactor'."
Write the test. Watch it fail. Make it pass. Clean up. Repeat.
`NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST`
If you're writing production code and no test just failed, you're doing it wrong.
1. Write ONE test that describes the desired behavior 2. Run the test suite 3. Verify it fails for the RIGHT reason (not a syntax error, not a missing import) 4. If it passes, your test is wrong or the feature already exists
**Verification gate:** Test output shows a meaningful failure related to the behavior you're implementing.
1. Write the MINIMUM code to make the test pass 2. No extra methods. No abstractions. No "while I'm here" additions 3. Run the test suite 4. ALL tests pass (not just the new one)
**Verification gate:** Full test suite green. Zero failures.
1. Remove duplication introduced in the GREEN step 2. Improve naming, extract methods if warranted 3. Run the test suite after EVERY change 4. No new behavior during refactor - tests stay green throughout
**Verification gate:** Tests still green. Code is cleaner. No new functionality added.
| Excuse | Counter | |--------|---------| | "I'll write tests after" | Tests written after prove nothing - they pass immediately | | "Too simple to test" | Simple code breaks. Test takes 30 seconds | | "I know this works" | Confidence is not evidence. The test IS the evidence | | "Tests will slow me down" | Debugging without tests slows you down more | | "Just a refactor" | Refactors without tests are rewrites without safety nets | | "The types guarantee correctness" | Types check structure, not behavior. Test the behavior | | "It's just a config change" | Config changes cause production outages. Test them | | "I'll TDD the next one" | You said that last time. Start now |
Thoughts that signal you're about to violate TDD:
If you catch yourself thinking any of these: STOP. Write the test first.
The `tdd_enforcer` hook gates file edits when `OMC_TDD_MODE` is enabled. This skill guides the methodology. The hook fires, you see the gate, invoke this skill for how to proceed.
**Flow:** Hook blocks edit -> Read the message -> Write/update a test -> Run tests (see RED) -> Now implement (GREEN) -> Clean up (REFACTOR).
| Problem | Solution | |---------|----------| | Can't figure out what to test | Test the simplest case first. What's the most basic input/output? | | Test is too complex | Break the behavior into smaller units. Test each one | | Don't know the test framework | Check existing tests in the project. Copy the pattern | | Test requires too much setup | That's a design smell. Simplify the interface under test | | Multiple things need testing | One test at a time. Pick the smallest behavior first | | Existing code has no tests | Start with the change you're making. Test the new behavior | | Test passes immediately | Your test isn't testing what you think. Check assertions | | Can't make the test fail | You might be testing something already implemented. Test the GAP |
A test that exists before the code proves the code works. A test written after proves nothing but that you can reverse-engineer assertions.
Add ultrawork to any prompt for maximum parallel execution
Systematic debugging methodology for diagnosing failures and root cause analysis. Triggers on: 2+ failed fix attempts,…
MUST be used for ANY git workflow that involves committing code. This includes explicit commit requests AND implicit ones like…
Initialize or migrate to nested CLAUDE.md structure for progressive disclosure. Claude auto-loads CLAUDE.md from any directory it…
Use when applying oh-my-claude workflow guidance, ultrawork modes, agent orchestration, plan execution, or plugin configuration.
MUST be used when creating pull requests. Handles context gathering, title generation (conventional commit format), body…
Transform approved plans into ralph loop infrastructure. Triggers on: '/ralph-loop-init', '/ralph-init', 'setup ralph loop',…