Authoring Skills
Skills are Markdown files at plugins/<plugin>/skills/<name>/SKILL.md.
Required front-matter
Section titled “Required front-matter”---name: my-skilldescription: One-sentence description of what this skill does.---Both name and description are required. The PostToolUse hook validates these on every save.
Skill body structure
Section titled “Skill body structure”A well-structured skill body has:
- Trigger — what command or natural language pattern activates this skill
- Pre-conditions — what must be true before the skill runs (e.g., sass installed)
- Steps — numbered workflow with clear inputs and outputs at each step
- Output contract — exactly what files will be created, where, and in what format
- Failure handling — what happens when a step fails (rollback, error message, retry)
- Examples — sample inputs and outputs
Reference docs
Section titled “Reference docs”Skills read from skills/<name>/references/ to get domain knowledge. Keep reference docs factual and structured — they’re loaded into context on every skill invocation.
Atomic write contract
Section titled “Atomic write contract”Any skill that writes files must follow the atomic write contract:
- Build output in memory
- Write to temp file
- Validate temp file
- Copy to real destination on pass
- Discard temp on failure