Use when creating new skills, editing existing skills, or verifying skills work before deployment
Writing skills IS TDD applied to process documentation.
Personal skills live in agent-specific dirs (~/.claude/skills for Claude Code, ~/.agents/skills/ for Codex)
Write test cases (pressure scenarios with subagents), watch them fail (baseline), write skill (documentation), watch tests pass (agents comply), refactor (close loopholes).
Core principle: Didn't watch agent fail without skill? Don't know if skill teaches right thing.
REQUIRED BACKGROUND: Must understand superpowers:test-driven-development first. Defines RED-GREEN-REFACTOR cycle. This skill adapts TDD to documentation.
Official guidance: See anthropic-best-practices.md for Anthropic's official skill authoring best practices.
Reference guide for proven techniques, patterns, or tools.
Skills are: Reusable techniques, patterns, tools, reference guides Skills are NOT: Narratives about solving a problem once
| TDD Concept | Skill Creation |
|---|---|
| Test case | Pressure scenario with subagent |
| Production code | Skill document (SKILL.md) |
| Test fails (RED) | Agent violates rule without skill (baseline) |
| Test passes (GREEN) | Agent complies with skill present |
| Refactor | Close loopholes maintaining compliance |
| Write test first | Run baseline scenario BEFORE writing skill |
| Watch it fail | Document exact rationalizations agent uses |
| Minimal code | Write skill addressing those specific violations |
| Watch it pass | Verify agent now complies |
| Refactor cycle | Find new rationalizations -> plug -> re-verify |
Create when:
Don't create for:
Concrete method with steps (condition-based-waiting, root-cause-tracing)
Way of thinking about problems (flatten-with-flags, test-invariants)
API docs, syntax guides, tool documentation
skills/
skill-name/
SKILL.md # Main reference (required)
supporting-file.* # Only if needed
Flat namespace - all skills in one searchable namespace
Separate files for:
Keep inline: Principles, code patterns (< 50 lines), everything else
Frontmatter (YAML):
name and description (see agentskills.io/specification)name: Letters, numbers, hyphens onlydescription: Third-person, ONLY when to use (NOT what it does)
---