How to write an agent skill (SKILL.md) that works
Write a SKILL.md an AI agent actually uses: the name and description rules, how long it should be, when to split files, and how to test it before you share it.
The two lines that decide everything
An agent reads only the name and description of every skill it has. It opens the rest when a request matches.
So the description is the trigger. If it is vague, the skill never runs.
- name: up to 64 characters, lowercase letters, numbers and hyphens. Anthropic reserves the words anthropic and claude.
- description: up to 1,024 characters. Say what the skill does and when to use it.
- Write the description in the third person, like a label: Turns meeting notes into a task list. Not: I can help you with notes.
- Name the words people will type: the file types, tools and tasks.
A small example
A skill is a folder with a SKILL.md file inside. This one is complete:
| Top of the file | name: writing‑release‑notes description: Writes release notes from a list of merged pull requests. Use when the user asks for release notes, a changelog or a summary of what shipped. |
| Body | Group changes into New, Improved and Fixed. One line per change, in plain words. Leave out internal refactors. End with the version number and the date. |
Anthropic suggests names in the form of an action, like writing‑release‑notes or analyzing‑spreadsheets. Avoid vague names such as helper or tools.
Write less than you think
Anthropic’s advice is to add only what the model does not already know.
Skip explanations of common tools and file types. Spend the words on your rules, your format and your edge cases.
Match how strict you are to how fragile the task is.
- Open tasks, like a code review: give the goals and let the agent choose the steps.
- Fragile tasks, like a database migration: give the exact command and say not to change it.
Offer one default way to do something, not a list of five tools to pick from.
Keep it short and split the rest
Anthropic recommends a SKILL.md body under 500 lines.
Move long detail into separate files in the same folder, such as REFERENCE.md or EXAMPLES.md, and link them from SKILL.md. The agent opens them only when it needs them.
- Link files one level deep from SKILL.md. Files that link to more files may be read only in part.
- Give a long reference file a short table of contents at the top.
- Use clear file names and forward slashes in paths, even on Windows.
- Leave out dates and version notes that will go stale.
- Use one term for one thing all the way through.
Test it before you share it
- Pick three real tasks the skill should handle.
- Run them without the skill and note what goes wrong.
- Write the smallest skill that fixes those problems.
- Run the same three tasks again in a fresh chat with the skill installed.
- Watch which files the agent opens. A file it never reads is either badly linked or not needed.
If you use several models, test on each one. A small model may need more guidance than a large one.
Learn from skills that already work
Reading good skills is the fastest way to learn the format.
Every agent skill on Scroll AI Now shows its full text, its author and its license. Start with one close to your task and compare its description with yours.
To install a finished skill, follow how to use an AI agent skill in Claude and ChatGPT.