How to write a SKILL.md that Claude invokes at the right moment, and no other.
gh skill install calebstewart/ai-slop writing-skills --agent claude-code --scope userOther agents, other scopes, and the copy-and-symlink routes are on the install page.
A guide for writing agent skills, written as an agent skill. It loads when you ask Claude to create, author, scaffold, or improve a skill or a custom slash command, and turns “write me a skill for X” from an improvisation into a repeatable procedure.
Mildly recursive, and the one thing in this repo that makes the rest of it easier to produce.
The SKILL.md body is the part needed every time — a seven-step workflow, plus troubleshooting and a pre-ship checklist:
/command, not the frontmatter name.description. The highest-leverage line in the file, since it’s the only part always resident in context and the sole basis for auto-invocation.Detail lives in sibling files that get read only when a step points at them:
| File | Contents |
|---|---|
reference/best-practices.md | The authoring principles in depth — conciseness, descriptions, progressive disclosure, degrees of freedom, bundled scripts, anti-patterns, and the annotated pre-ship checklist. |
reference/frontmatter.md | Every frontmatter field, how the command name is derived, the invocation matrix, string substitutions, and dynamic context injection. |
reference/templates.md | Copy-paste starting points for the common skill shapes. |
reference/api-wrappers.md | Wrapping an API that has no CLI: one bundled script with abstracted subcommands plus a generic passthrough, and how to describe that surface. |
Model-invoked, so usually you don’t invoke it at all — asking for a new skill is enough. /writing-skills works if it doesn’t fire on its own.
Most of the guidance is Claude Code-specific (frontmatter fields, /command derivation, invocation control), but the workflow and authoring principles carry over to any agent that reads a SKILL.md.
Two ideas do most of the work here, and both push toward writing less: