Home / Guides / How to write a SKILL.md that triggers reliably
How to write a SKILL.md that triggers reliably
Agents see only the name and description of each skill until they decide to load one. If the description is vague, the skill never fires. Fix the description first.
Published 2026-12-02. By hackerdb.
1. One job per skill
If you cannot say the trigger in one sentence, split the skill. "Review a pull request" is a skill. "Help with code" is not.
2. Write the description as: what it does, then when to use it
Example shape: Plan and review a database migration so it is safe on a live system. Use when asked to add, change or remove columns, tables or indexes, or to backfill data. Use the words people really type: "PR", "migration", "postmortem", "threat model".
3. Write the body as a procedure
Goal, inputs to ask for, numbered steps, output format, rules (what never to do). Prefer concrete checks over advice. Aim for under 60 lines and move long reference material into separate files that the skill tells the agent to open when needed.
4. Test triggering with two sets of prompts
Write five prompts that should trigger the skill and five near misses that should not. Try them. If it misfires, change the description, not the body.
5. Test the output
Run it on a real example. Check the output format and the rules. Where the agent drifted, tighten the wording or add an example.
6. Treat skills as code
Version them, review changes, and do not install third-party skills without reading them: see how to review a skill or MCP server.
The Coding Agent Skills and AGENTS.md Kit has 16 worked examples, including a write-a-skill skill that automates this checklist.