Sub topic 10
Writing skill descriptions that get selected
This chapter assumes you know the basic layout of a skill (a folder with a SKILL.md file and YAML frontmatter) and the idea of a context window. It builds on the earlier chapters on skill structure and progressive disclosure. Field names and limits differ between products, so check your tool's documentation for exact rules.
Why the description decides everything
A skill is only useful if the agent chooses to load it. At the start of a session, most tools put only each skill's name and description into the context. The agent reads those short entries, compares them with your request, and decides whether to open the full SKILL.md.
The description is therefore not a summary for humans. It is the trigger. If it is vague, the skill never loads. If it is too broad, the skill loads when it should not and wastes context or pushes the agent in the wrong direction.
The diagram shows where the description sits in the selection process.
Everything the agent knows when it makes the choice in the second step is the description. The body of the skill cannot help it, because the body has not been loaded yet.
The two jobs of a description
A good description answers two questions in one or two sentences:
- What does the skill do?
- When should the agent use it?
Compare these two versions of the skill from the Topic Spine.
# Weak: says what the skill is about, but not when to use it
description: Changelog helper.# Better: says what it does and names the situations that should trigger it
description: Writes a changelog entry in the project's format. Use when the user asks to add, draft, or update a changelog or release note.The second version has a verb ("Writes"), an output ("a changelog entry in the project's format"), and a list of request types ("add, draft, or update a changelog or release note"). Those request types are the part that does the matching.
Write for the words users actually say
The agent matches meaning, not exact strings, but your wording still sets what it notices. Users rarely say "changelog entry skill". They say "add a line to the release notes" or "document this fix for the next version".
Include the nouns and verbs people use in real requests:
- Name the artifact: "changelog", "release note", "migration", "pull request description".
- Name the file types or tools involved: "
.xlsxfiles", "Dockerfile", "OpenAPI spec". - Include synonyms when your team uses several terms for one thing.
- Name the situation, not only the topic: "Use when a build fails with a dependency error" is easier to match than "Dependency help".
Do not stuff the field with every keyword you can think of. A list of twenty loosely related terms makes the skill match requests it cannot handle.
Point of view and tone
Most products inject the description into a system prompt alongside other skills. Write it as a plain statement about the skill, in the third person: "Writes release notes..." rather than "I can write release notes..." or "Use this to help you...". A consistent voice across skills keeps the list easy for the agent to scan.
Put the most distinguishing words first. If the tool truncates long descriptions, the beginning is what survives.
Length and limits
Descriptions have to be short because every installed skill pays this cost in every session. Many tools cap the field at a few hundred to about a thousand characters, and some also cap the total space for all skill descriptions. Treat these as product-specific limits and look them up.
A practical target is one to three sentences. If you cannot fit the trigger conditions in that space, the skill probably does too much, and you should split it.
Too broad, too narrow, and overlapping
The table shows common failure patterns and what to do about each.
| Pattern | Example description | What goes wrong | Fix |
|---|---|---|---|
| Too vague | Helps with documents. | Rarely selected, or selected for everything | Name the document type and the action |
| Too broad | Use for any coding task. | Loads on every request and wastes context | Narrow to one workflow |
| Too narrow | Use only when the user types "/changelog v2". | Misses natural phrasings | Describe the situation, not an exact phrase |
| Overlapping | Two skills both say "Reviews code." | The agent picks one unpredictably | Give each a distinct trigger, or merge them |
| Describes internals | Uses a Python script and three templates. | Says how, not when | Move implementation detail into the body |
Overlap deserves special attention. When two skills have similar descriptions, the agent has no basis to prefer one. Add a boundary to each. For example, one skill might say "Reviews code for security issues. Use for security audits, not general review", while the other says "Reviews code for readability and tests. Not for security audits."
A short negative clause is useful when a neighboring skill exists. Use it sparingly, because every added clause costs space and can confuse matching.
A worked rewrite
Suppose you have a skill that formats SQL migration files. The first draft is:
---
name: migrations
description: Database migrations.
---This fails in several ways. It names a topic, not an action. It does not say when to apply the skill. It would also compete with any other database skill.
A revised version:
---
name: sql-migration-writer
description: Creates and checks SQL migration files in the project's naming and rollback format. Use when the user asks to add a table or column, change a schema, or write a migration. Not for running migrations against a database.
---Each part has a purpose:
- "Creates and checks SQL migration files" states the action and output.
- "in the project's naming and rollback format" explains why a skill is needed instead of a generic answer.
- "Use when the user asks to add a table or column, change a schema, or write a migration" lists realistic triggers.
- "Not for running migrations against a database" draws a boundary so that a separate deployment skill, or no skill, handles that request.
The name also changed from migrations to sql-migration-writer. Many tools require lowercase letters, digits, and hyphens in the name and cap its length, so check your tool's rules. A specific name is another small signal for matching.
Test the description like code
You cannot judge a description by reading it. Test it with prompts and observe what the agent does. A simple routine:
- Write five prompts that should trigger the skill, in different wording. Include a casual one and one that never uses the skill's name.
- Write five prompts that should not trigger it, including near misses that touch the same files or topic.
- Run each in a fresh session, so earlier context does not influence the result.
- Record whether the skill loaded. Many tools show which skills were used, or you can ask the agent which skill it considered.
- Adjust the description and repeat.
If a should-trigger prompt fails, add the missing words or situation to the description. If a should-not-trigger prompt loads the skill, narrow the description or add a boundary clause. Change one thing at a time so you know which edit mattered.
Common mistakes
- Putting trigger conditions only in the body of
SKILL.md. The agent never sees the body until the skill is loaded, so the condition has to be in the description. - Writing a marketing-style description ("A powerful toolkit for...") that has no concrete actions or triggers.
- Using YAML that breaks parsing. A description containing a colon followed by a space, or one that spans lines without proper quoting, can make the frontmatter invalid. Wrap such descriptions in quotes or use a block scalar, and confirm that the tool still lists the skill.
- Forgetting to revisit the description after the body changes. If the skill now does more or less than before, the description is out of date.
- Forcing selection with a description that says "ALWAYS use this skill". If a skill should be used every time, it belongs in persistent project instructions, not in a skill.
Exercise
A skill named pr-description has the description "Pull request tool." Users who say "write up my changes for review" never trigger it. Rewrite the description in one or two sentences, and name two things your rewrite adds.
Show answer
Example: "Drafts a pull request description from the current branch's changes, with a summary, test notes, and risks. Use when the user asks to write up changes, describe a PR, or prepare something for review." It adds (1) a concrete action and output, and (2) trigger situations in the words users actually use, such as "write up changes" and "prepare for review". A boundary clause, such as "Not for reviewing someone else's pull request", is an optional third addition.
Exercise
Two skills have the descriptions "Reviews code" and "Reviews code for problems". The agent sometimes loads one and sometimes the other. What is the cause, and what are two ways to fix it?
Show answer
The descriptions overlap, so the agent has no basis to prefer either. Fix it by giving each skill a distinct trigger (for example, one for security audits and one for readability and test coverage), with a short boundary clause in each, or by merging them into one skill if their workflows are the same.