/oh-my-claude:writing-skillsfrom oh-my-claude
Applies TDD principles to skill authoring. Use when creating new skills, editing existing skills, or authoring plugin components.
Ships in oh-my-claude. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
TDD applied to process documentation.
Writing skills IS TDD applied to process documentation. If you can't test it breaks without the skill, the skill isn't needed.
| TDD Concept | Skill Equivalent |
|---|---|
| Test case | Pressure scenario (situation where agent fails without skill) |
| Production code | SKILL.md content |
| Failing test | Agent demonstrably fails the scenario |
| Passing test | Agent handles scenario correctly with skill loaded |
| Refactor | Trim to minimum effective content |
Identify 3+ pressure scenarios where the agent fails without this skill. Document the failure mode. This is your test suite. If you can't find 3 scenarios, the skill probably isn't needed.
Write SKILL.md that addresses every identified failure. Minimum content to pass -- no extras, no nice-to-haves, no "comprehensive guides." Every section must map to at least one pressure scenario.
Remove anything that doesn't directly address a pressure scenario. Target ~120 lines. If removing a line doesn't weaken any pressure scenario, remove it.
---
name: {short-name}
description: "{Role sentence}. Use when {triggers}. Triggers on: {keywords}."
---
# {Name} Skill
{Tagline}
## When to Apply
## Core Pattern / Framework
## Anti-Rationalization Table (if methodology skill)
## Common Mistakes
## The Bottom Line
The description field determines when Claude loads your skill. Get it wrong and the skill never fires.
Good: "Use when receiving review comments from code-reviewer agent, PR reviews, or external feedback. Triggers on: 'review feedback', 'address review', 'fix review comments'."
Bad: "A comprehensive guide to handling code review feedback through a structured process"
The bad example describes what the skill contains. The good example describes when to load it.
| Type | Purpose | Example | Line Target |
|---|---|---|---|
| Technique | How to do X | debugger | ~120 lines |
| Pattern | When to use X | receiving-code-review | ~120 lines |
| Methodology | Discipline for X | tdd, verification | ~130 lines |
| Meta | How to create X | writing-skills | ~140 lines |
| Excuse | Counter |
|---|---|
| "The skill is obviously clear" | If it's obvious, you can write 3 failure scenarios in 2 minutes |
| "It's just a reference doc" | Reference docs that don't address failures are shelf-ware |
| "Testing documentation is overkill" | Testing docs IS identifying what problems they solve |
| "I'll test it in practice" | Without defined scenarios, you won't notice when it fails |
Not everything deserves a skill:
Every line must earn its place:
The test: "If removing this line doesn't weaken any pressure scenario, remove it."
Avoid:
Skills use ONLY name and description in frontmatter:
---
name: my-skill
description: "What it does. Use when X. Triggers on: 'keyword1', 'keyword2'."
---
No model, tools, or permissionMode. These are not agent definitions.
| Mistake | Why It's Wrong | Do This Instead |
|---|---|---|
| Writing without pressure scenarios | No way to verify the skill works | RED phase first -- always |
| Summarizing workflow in description | Claude can't match it to triggers | Use "Use when..." pattern |
| Including everything you know | Bloats context, dilutes signal | Only what prevents identified failures |
| Skipping refactor phase | Skills grow stale and verbose | Trim after every edit |
| Copying another skill's structure | Different types need different shapes | Match structure to skill type |
A skill without tested pressure scenarios is documentation. Documentation without a problem to solve is noise.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
skill-authoring, tdd, skill-development, claude-code-skills, methodology
npx claudepluginhub techdufus/oh-my-claude --plugin oh-my-claude12 skills in this plugin
/debuggerSystematic debugging methodology for diagnosing failures and root cause analysis. Triggers on: 2+ failed fix attempts, 'ultradebug', 'uld', debugging in circles, complex system failures, intermittent bugs./git-commit-validatorMUST be used for ANY git workflow that involves committing code. This includes explicit commit requests AND implicit ones like 'ship it', 'wrap it up', or finishing implementation work. Handles staging, message generation, validation, and commit execution with conventional commit format./init-deepInitialize or migrate to nested CLAUDE.md structure for progressive disclosure. Claude auto-loads CLAUDE.md from any directory it reads, enabling true contextual guidance. Triggers on: '/init-deep', 'deep init', 'initialize deeply', 'setup claude deeply', 'refactor claude.md', 'migrate claude.md', 'nested claude', 'progressive disclosure'./oh-my-claude-runtimeUse when applying oh-my-claude workflow guidance, ultrawork modes, agent orchestration, plan execution, or plugin configuration./pr-creationMUST be used when creating pull requests. Handles context gathering, title generation (conventional commit format), body formatting, and PR creation via GitHub CLI. Creates PRs as drafts by default. Triggers on: 'create PR', 'open PR', 'ready for review', 'push for PR', 'send for review'./ralph-loop-initTransform approved plans into ralph loop infrastructure. Triggers on: '/ralph-loop-init', '/ralph-init', 'setup ralph loop', 'generate ralph loop'. Creates .ralph/ directory with prd.json, loop.py, CLAUDE.md, and supporting files.Other plugins' skills for the same job