plugins/coordinator/skills/writing-skills/SKILL.md
Use when creating new skills, editing existing skills, or verifying skills work before deployment
npx skillsauth add oduffy-delphi/coordinator-claude writing-skillsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Writing skills IS Test-Driven Development applied to process documentation. Skills live at ${CLAUDE_PLUGIN_ROOT}/skills/{skill-name}/SKILL.md.
Write pressure scenarios with subagents (test cases), watch them fail (baseline), write the skill, watch tests pass, refactor to close loopholes.
Core principle: If you didn't watch an agent fail without the skill, you don't know if the skill teaches the right thing.
REQUIRED BACKGROUND: Understand coordinator:test-driven-development first — this skill adapts that cycle to documentation. For Anthropic's official guidance see anthropic-best-practices.md.
A reference guide for proven techniques, patterns, or tools. Skills are reusable; they are NOT narratives about how you solved a problem once.
| TDD Concept | Skill Creation | |-------------|----------------| | Test case | Pressure scenario with subagent | | Production code | SKILL.md | | RED | Agent violates rule without skill (baseline) | | GREEN | Agent complies with skill present | | Refactor | Close loopholes while maintaining compliance |
Anti-proliferation gate — check FIRST. Search the skills directory for related names. If a related skill exists, extend it. New files need justification.
Create when: the technique wasn't intuitively obvious, you'd reference it across projects, the pattern applies broadly, no existing skill covers the territory.
Don't create for: one-off solutions, well-documented standard practices, project-specific conventions (use CLAUDE.md), mechanical constraints enforceable with regex/validation.
condition-based-waiting, root-cause-tracing)flatten-with-flags, test-invariants)skills/
skill-name/
SKILL.md # Main reference (required)
supporting-file.* # Heavy reference or reusable tools only
Flat namespace, all skills searchable. Inline principles, concepts, and short code patterns (<50 lines). Separate files for heavy reference (100+ lines) or reusable scripts/templates.
Frontmatter:
name and description supported. Max 1024 chars total.name: letters, numbers, hyphens only.description: third-person, describes ONLY when to use, NOT what it does — start with "Use when..."---
name: skill-name-with-hyphens
description: Use when [specific triggering conditions and symptoms]
---
# Skill Name
## Overview
What is this? Core principle in 1-2 sentences.
## When to Use
Bullet list with symptoms/use cases. When NOT to use.
## Core Pattern (techniques/patterns)
Before/after comparison.
## Quick Reference
Table or bullets for scanning.
## Implementation
Inline code OR link to file.
## Common Mistakes
What goes wrong + fixes.
Description = When to Use, NOT What the Skill Does. Empirically: descriptions that summarize workflow create a shortcut Claude takes instead of reading the skill body. A description saying "code review between tasks" caused Claude to do ONE review even though the skill flowchart specified TWO. When changed to just triggering conditions, Claude correctly read the flowchart.
# BAD: workflow summary creates shortcut
description: Use when executing plans - dispatches subagent per task with code review between tasks
# GOOD: triggering conditions only
description: Use when executing implementation plans with independent tasks
Keyword coverage — use words Claude would search for: error messages ("Hook timed out"), symptoms ("flaky", "hanging"), synonyms ("timeout/hang/freeze"), tool names.
Descriptive naming — active voice, verb-first. creating-skills not skill-creation. condition-based-waiting not async-test-helpers.
Token efficiency — frequently-loaded skills should be <200 words total; others <500. Move flag details to --help. Cross-reference rather than duplicate. Compress examples ruthlessly. Verify with wc -w.
Cross-referencing other skills — name only with explicit requirement marker:
**REQUIRED BACKGROUND:** Use coordinator:test-driven-development@skills/... syntax force-loads files immediately, burning context.Use ONLY for: non-obvious decision points, process loops where you might stop too early, "when to use A vs B" decisions. Never for reference material (use tables), code examples (use markdown), or linear instructions (use numbered lists). See @graphviz-conventions.dot.
One excellent example beats many mediocre ones. Choose the most relevant language; complete, runnable, well-commented explaining WHY, from a real scenario. Don't implement in 5+ languages, don't write fill-in-the-blank templates, don't write contrived examples.
allowed-tools must be a YAML list, not a scalar. allowed-tools: Write silently passes YAML parsing but fails schema check. Correct form:
allowed-tools:
- Write
access-mode: read-only silently overrides the tools list. An agent with Write in tools: but access-mode: read-only cannot write — the deliverable disappears. Default agents that produce file output to access-mode: read-write.
Prompts live in one place. A driver/skill/command MUST @-reference the canonical prompt template, never inline its body. Drift between inlined copy and template is a silent correctness bug.
Hook authoring — see coordinator/docs/hook-authoring-notes.md for SubagentStop agent_type gating and stderr-as-error-channel footguns.
NO SKILL WITHOUT A FAILING TEST FIRST
Applies to NEW skills AND EDITS. Wrote skill before testing? Delete it, start over. Same for edits. No exceptions for "simple additions," "just adding a section," "documentation updates," or "I'm confident it's good." Deploying untested skills = deploying untested code.
For the rationalization table (8 common excuses for skipping testing) and the full RED-GREEN-REFACTOR cycle with anti-patterns, see skill-bulletproofing.md in this directory.
skill-bulletproofing.md — rationalization defense, loophole closing, RED-GREEN-REFACTOR cycle, anti-patternstesting-skills-with-subagents.md — complete testing methodology with pressure scenariospersuasion-principles.md — persuasion techniques for descriptions and agent compliance promptsexamples/CLAUDE_MD_TESTING.md — archived test design for compliance under pressureAfter writing ANY skill, complete the deployment checklist before moving on. Do NOT batch skill creation without testing each. Use TaskCreate for each checklist item.
RED — Write Failing Test:
GREEN — Write Minimal Skill:
REFACTOR — Close Loopholes:
Quality:
Dependency discipline (hard-dep vs soft-dep):
Run /X first if not configured)if a project tracker exists, any CLAUDE.md conventions); never name the producing skillDeployment:
Same Iron Law as TDD. Same cycle: RED → GREEN → REFACTOR. Same benefits: better quality, fewer surprises, bulletproof results.
tools
Orient session — preflight, load context, choose work
documentation
Wrap up finished work — capture lessons, update docs
development
Triangulate plan-claim / code-reality / review oracles to classify each plan into DELIVERED+REVIEWED / DELIVERED-UNREVIEWED / PARTIAL / IN-FLIGHT / ABANDONED. Run after any crash or 'did we actually finish what we think we finished?' moment.
testing
Check for a published coordinator update and advise a preserve-by-default migration path — never a blind overwrite.