Blog / Authoring
How to Write a SKILL.md Description That Triggers
The SKILL.md description is what Claude reads to decide whether to load your skill. Limits, a what-plus-when formula, before-and-after rewrites and a test loop.

The description is the only part of a skill that Claude sees before it decides to use it. Say what the skill does, say when to use it, put the key use case first, and test it with real prompts.
Table of contents
- The short answer
- What the description does
- The rules the docs set
- A formula: what, when, keywords
- Before and after: five rewrites
- What real public skills do
- Front-load and stay under the cap
- Too many skills: when descriptions get dropped
- A test loop for triggering
- Fixing a skill that does not fire
- Common mistakes
- FAQ
The short answer
A skill's description is the line Claude uses to decide whether your skill is relevant to the task in front of it. The body of SKILL.md, your scripts and your reference files do nothing until that decision is made. So a skill with great instructions and a weak description behaves like a skill that does not exist.
The recipe is short. Write in the third person. Start with what the skill does, then add "Use when" followed by the situations, file types and phrases that should bring it in. Put the most important use case in the first sentence. Keep the whole thing well under 1,024 characters. Then test it with prompts you did not write while looking at the description.
I build AI agents full-time and I write a lot of skills. Most "my skill never triggers" problems I see come down to a description that says what the skill is and never says when to reach for it. This article is based on Anthropic's skill authoring guide, the Claude Code skills documentation and the Codex skills documentation, all read on 2026-11-24, plus the public descriptions of skills in the Ragspaces catalog. Where the docs give no number, I say so.
What the description does
Skills load in stages. Anthropic's overview says that "until a Skill is triggered, only its name and description occupy context" (Agent Skills overview). Metadata is loaded at startup at roughly 100 tokens per skill, the SKILL.md body loads when the skill triggers, and bundled files load only when read.
Claude Code says the same thing in its own words: "In a regular session, skill descriptions are loaded into context so Claude knows what's available, but full skill content only loads when invoked" (Claude Code skills docs). By default both you and Claude can invoke a skill. You can type /skill-name, and Claude can load it on its own when it looks relevant to the conversation.
That second path is the one this article is about. When Claude decides on its own, the only evidence it has is the name and the description. The authoring guide puts it plainly: Claude "uses it to choose the right Skill from potentially 100+ available Skills," so the description "must provide enough detail for Claude to determine when to select this Skill" (best practices). The rest of SKILL.md, in the guide's words, provides "the implementation details."
Codex works the same way. Its docs describe skills starting with only their name and description, with implicit matching on the description, and an agents/openai.yaml setting called allow_implicit_invocation that defaults to true (Codex skills docs). A description that triggers well in Claude Code tends to trigger in Codex too, because both read the same SKILL.md frontmatter.
One practical consequence: you cannot hide a trigger condition in the body. A line in the body like "use this only for quarterly reports" is read after the skill has already fired. If it belongs in the decision, it belongs in the description.
The rules the docs set
Here is what the official pages say about the field, with the pages named so you can check the current wording. Limits change, so treat the check date, 2026-11-24, as part of each fact.
| Rule | What the docs say | Source |
|---|---|---|
| Required | name and description are the two frontmatter fields the authoring guide calls required |
Best practices |
| Length | Non-empty, maximum 1,024 characters | Best practices |
| No XML tags | The description "cannot contain XML tags" | Best practices |
| Content | "Should describe what the Skill does and when to use it" | Best practices |
| Voice | "Always write in third person" because the description "is injected into the system prompt" | Best practices |
| Claude Code listing cap | Combined description and when_to_use text "is truncated at 1,536 characters in the skill listing" |
Claude Code skills docs |
| Claude Code, optional | In Claude Code every frontmatter field is optional, and description is the recommended one |
Claude Code skills docs |
| Name | Up to 64 characters, lowercase letters, numbers and hyphens, no anthropic or claude |
Best practices |
Two things in that table deserve a second look.
The first is the pair of limits. The 1,024-character cap is the general rule in Anthropic's authoring guide. The 1,536-character figure is a separate truncation in Claude Code's skill listing, and it applies to description and when_to_use combined. Staying under 1,024 satisfies both. Claude Code's docs add that if you leave description out, it "uses the first non-empty line of the markdown content," which is a poor trigger signal for most skills.
The second is the third-person rule. The guide's examples: "Processes Excel files and generates reports" is good, while "I can help you process Excel files" and "You can use this to process Excel files" are to be avoided. The stated reason is that the description is injected into the system prompt and inconsistent point of view "can cause discovery problems." The docs do not give a measured effect size, and I do not have one either. It costs nothing to follow.
A formula: what, when, keywords
The docs show the shape. Every good example in Anthropic's guide has two parts: a verb phrase for what the skill does, then a "Use when" clause for the situations. Here are the three examples from the guide, quoted:
description: Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction.
description: Analyze Excel spreadsheets, create pivot tables, generate charts. Use when analyzing Excel files, spreadsheets, tabular data, or .xlsx files.
description: Generate descriptive commit messages by analyzing git diffs. Use when the user asks for help writing commit messages or reviewing staged changes.
From those and from the Claude Code reference, I use a four-part checklist when I write one:
- Action sentence. One or two verb phrases for what the skill produces. "Generates commit messages from git diffs." Name the output, not the topic.
- Trigger clause. "Use when" plus the situations that should bring it in. Write them as things that happen in a session: a file type appears, the user asks for a task, a command fails.
- Key terms. The nouns people actually type. The guide says to "include key terms," and the Claude Code
when_to_usefield is described as holding "trigger phrases or example requests." If users say "rebase," "cherry-pick" and "stash pop," those words go in. - Boundary, only if needed. If a neighbouring skill or Claude's default behaviour covers the adjacent case, one short "Not for X" clause stops false triggers. Keep it to one clause, since every extra character counts against the cap.
Notice what the formula leaves out. It does not include the method, the steps, the tools or the quality bar. Those are the body's job. A description that explains how the skill works spends characters on text the decision does not need.
There is a design question hiding here: should the trigger go in description or in when_to_use? The Claude Code docs describe when_to_use as "additional context for when Claude should invoke the skill" that is appended to description in the listing and counts toward the same cap. So the two are concatenated. Because Codex and the general Agent Skills format centre on description, I put the full what-and-when in description and use when_to_use only when I want to keep a long list of example phrases separate for readability.
Before and after: five rewrites
These examples are my own, written to illustrate the formula. The "before" lines are written for this article, except where I say so. The weak ones follow the patterns Anthropic lists as vague: "Helps with documents," "Processes data" and "Does stuff with files."
1. The topic label
Before:
description: Helps with documents
After:
description: Creates, edits and reads Word .docx files, including tracked changes and templates. Use when the user mentions a Word document, a .docx file, or wants a report or letter produced as a Word file.
The "before" gives Claude nothing to match against. The "after" names three file or format signals and two kinds of request.
2. The first-person pitch
Before:
description: I can help you write better commit messages
After:
description: Writes commit messages from the staged git diff in conventional-commit format. Use when the user asks for a commit message, asks what to write for a commit, or wants staged changes summarised.
This fixes the point of view and adds the output format and three phrasings.
3. The description that explains the method
Before:
description: Uses a four-step process of reading the schema, drafting queries, validating results and formatting tables to answer data questions
After:
description: Answers questions about the sales warehouse by writing and running SQL against the reporting schema. Use when the user asks about revenue, pipeline, churn or any number that lives in the warehouse.
The four steps belong in the body. The description now says which questions the skill owns, with the domain words in it.
4. The catch-all
Before:
description: Use this skill for any coding task
After:
description: Reviews a pull request diff for bugs, missing tests and unclear naming, and reports findings without editing files. Use when the user asks for a code review or to check a branch before merging.
A skill that claims everything competes with Claude's default behaviour and with every other skill. A narrow claim is easier to match and easier to debug.
5. The pile of keywords
Before:
description: PDF, forms, merge, split, rotate, OCR, watermark, extract, encrypt, images, tables, convert
After:
description: Merges, splits and fills PDF files, and extracts text and tables from them. Use when the user mentions a PDF, a form to fill, or wants pages combined or separated.
Keywords alone read as noise and give no action. The rewrite keeps the strongest terms inside sentences. The guide asks for "key terms" and for what the skill does and when to use it, and the keyword list only does the first of those.
What real public skills do
I read the public descriptions of skills in the Ragspaces catalog, taken from each skill's page on 2026-11-23 (the Ragspaces pages show description and install steps without an account). Each one is read against the formula above: does it say what the skill does, and when to use it.
The range is wide. tom_pixel/resolving-merge-conflicts has this description in full: "Use when you need to resolve an in-progress git merge/rebase conflict." It has a trigger and almost no vocabulary. A user who types "my rebase stopped" would likely match, but "cherry-pick conflict" or "stash pop" are not in the text.
A different skill for the same job, hugo_hacks/resolve-merge-conflicts, reads: "Resolve Git merge conflicts by extracting only unresolved paths, conflict hunks, and compact diffs instead of loading whole files into context. Use when a merge, rebase, cherry-pick, or stash pop stops on conflicts, when git status shows unmerged paths, or when files contain conflict markers." It follows the formula closely: an action, a method clause in the first sentence, then a trigger list that includes four git operations and two observable signals (unmerged paths and conflict markers). Signals like those are good trigger material, because they show up in the session whether or not the user names the problem.
The PDF skills show another contrast. elena_14/pdf opens with "Use this skill whenever the user wants to do anything with PDF files," lists a dozen operations, and closes with "If the user mentions a .pdf file or asks to produce one, use this skill." It is broad on purpose, with a first sentence that claims the whole file type and a last sentence that restates the trigger. mei_nilsen/pdf-generator is the more conventional shape: "Create and manipulate PDF files programmatically. Use when the user needs to generate PDFs, fill PDF forms, extract PDF content, add watermarks/overlays, or merge documents," followed by a line starting "Keywords:". I compare these in more depth in PDF skills compared.
A third pattern is the long description. jamiet/ce-code-review reads "Structured code review for bugs, regressions, tests, and standards. Use before PRs or when asked for review; report-only by default, with explicit local apply available for user-directed fix workflows." Note the boundary inside it: "report-only by default." That clause tells Claude what the skill will not do, which helps when a user asks only for a review and would be surprised by edits.
None of this tells you which description wins. It does show that the structure in Anthropic's guide, an action followed by "Use when" and concrete signals, is what the more complete public descriptions use, and that the weakest of the group is the one that gives the fewest words to match on. To read more descriptions before you write yours, browse the Ragspaces catalog. Every skill page shows the description without an account, and copying a pattern that already works is faster than inventing one.
Front-load and stay under the cap
Claude Code's docs give one instruction about order: "Put the key use case first." The reason is the 1,536-character truncation in the skill listing. Anything past the cap is cut, so a trigger placed at the end of a long description may not be read at all. The cap is much larger than the 1,024-character limit most authors work to, so you will rarely hit it with a clean description, but it matters if you use when_to_use as well, since the two are combined.
The cap has a setting. The Claude Code docs say the maximum can be changed with skillListingMaxDescChars. I would not raise it as a fix. If your description needs more than a thousand characters to say when to use the skill, the skill probably does too many jobs, and splitting it gives each description a clear claim.
A few habits help:
- Put the verb and the output in the first ten words.
- Put the strongest trigger in the first sentence, not the last.
- Keep the list of example phrases to the ones people really type. Five good ones beat fifteen guesses.
- Do not use XML-style tags, since the format forbids them.
- Avoid dates and time-sensitive wording. The authoring guide warns against information that "will become outdated," and a description is read on every turn.
Too many skills: when descriptions get dropped
A good description can also fail for a reason unrelated to wording. Claude Code keeps the skill listing within a budget. Per the docs, the listing "always contains every skill name," but if you have many skills, Claude Code "drops some descriptions to fit the listing's character budget." The budget "scales at 1% of the model's context window," and when the listing overflows, descriptions are dropped "starting with the skills you invoke least" (Claude Code skills docs).
Read that twice, because the consequence is easy to miss. A rarely used skill is the first to lose its description when you install a lot of skills. A skill with a name and no description is much harder to trigger. So a skill that fires rarely can enter a cycle: it is invoked less, so its description is dropped sooner, so it triggers less.
The docs list ways to deal with it. You can raise the budget with skillListingBudgetFraction (the docs give 0.02 as an example value) or the SLASH_COMMAND_TOOL_CHAR_BUDGET variable. /context shows the size of the Skills row after the budget is applied, /doctor estimates the listing cost, and /skill-doctor reports what each skill costs and how often it is used. The skillOverrides setting takes the values "on," "name-only," "user-invocable-only" and "off," which lets you turn off skills you do not need rather than letting them crowd out the ones you do.
Short, precise descriptions also help here. Two hundred characters that say exactly when to fire cost less of the shared budget than a thousand characters of marketing prose. For the wider picture of how skills cost context, see SKILL.md vs CLAUDE.md vs AGENTS.md.
A test loop for triggering
Anthropic's guide has no built-in trigger test. It says of evaluations, "There is not currently a built-in way to run these evaluations. You can create your own evaluation system." What it does give is a method, and I adapt it to descriptions. Here it is as a procedure you can run on your own skill.
- Write the prompts first. Before editing the description, list ten things a real user might type that should trigger the skill. Include blunt ones ("my rebase broke") and formal ones ("resolve the merge conflicts in this branch"). The guide says to create evaluations before extensive documentation and to build at least three scenarios, and the same logic applies here.
- Add negative prompts. List five tasks that should not trigger it, especially tasks that sit next to the skill's job. A description that fires on everything is as broken as one that never fires.
- Run each prompt in a fresh session. Use a session where only the skill under test is likely to match, so another skill does not mask the result. The guide's "Claude A and Claude B" method is the model: one instance helps write the skill, a fresh instance uses it on real tasks, and you watch what it does.
- Record the outcome per prompt. Did the skill load? In Claude Code you can check which skills are available with
/skillsand the context size with/context. Note misses and false fires in a table. - Edit the description, not the body. For each miss, ask which word in the prompt was absent from the description. Add that word inside a natural sentence. For each false fire, add or sharpen the boundary clause.
- Rerun everything. A change that fixes one prompt can break another, so rerun the whole list.
- Try other models if you use them. The guide says to test with every model you plan to use, noting that "what works perfectly for Opus might need more detail for Haiku."
Keep the prompt list. It is a regression test for the description, and when you add a new skill that overlaps, you can rerun it.
If you share the skill with teammates, the guide's team-feedback step is a cheap extra signal: ask whether the skill "activate[s] when expected." People phrase requests in ways the author never thinks of.
Fixing a skill that does not fire
Work from cheapest check to most expensive.
Is the skill loaded at all? The Claude Code docs say that if a new skill does not appear, you run /reload-skills, and that changes are picked up within the current session. Confirm the folder is ~/.claude/skills/<skill-name>/SKILL.md or .claude/skills/<skill-name>/SKILL.md in the project (Claude Code skills docs).
Does the frontmatter parse? The docs state that "if the YAML between the markers doesn't parse, the skill still loads with no fields set." That is the worst case, because the skill exists but has no description. A description with an unquoted colon or a stray tag is the usual cause. Quote the string if it contains punctuation that YAML reads as syntax. The Claude Code docs have a "Skill not triggering" section for finding and fixing the error.
Is automatic invocation switched off? The disable-model-invocation: true field "prevent[s] Claude from automatically loading this skill" and is meant for workflows you trigger manually with /name. If it is set, no description can fix the problem. In Codex, the equivalent switch is allow_implicit_invocation in agents/openai.yaml, which defaults to true.
Is the description present in the listing? With many skills installed, check /context for the Skills row and /skill-doctor for cost and use. A dropped description looks exactly like a weak one.
Is the description competing? If two skills claim the same file type, Claude has to choose. Read both descriptions side by side and narrow one. This is also the case for adding a boundary clause.
Is it the wording? Only now rewrite. Use the formula above, run the prompt list, and change one thing at a time.
Common mistakes
Writing what the skill is, not when to use it. "A toolkit for database migrations" is a label. "Writes and checks database migration files. Use when the user asks to add a column, change a table or roll back a schema change" is a trigger.
Using first or second person. The docs say third person, because the text goes into the system prompt.
Describing the steps. The method belongs in the body, which loads after the decision.
Claiming too much. A skill for "any coding task" will fight with Claude's own defaults and with your other skills.
Hiding the trigger at the end. Claude Code says to put the key use case first.
Leaving out the words users type. If people say "stash pop" and your description says only "version control operations," the match is weaker than it needs to be.
Never retesting. Descriptions drift out of date as your skill set grows, and a new overlapping skill can steal your trigger.
Frequently asked questions
What is the SKILL.md description field?
It is one of the two required frontmatter fields, next to name. Claude reads the description to decide whether to load the skill, so it should say what the skill does and when to use it. The limit is 1,024 characters, and it cannot contain XML tags.
How long can a SKILL.md description be?
Anthropic's authoring guide sets a maximum of 1,024 characters. Claude Code separately truncates the combined description and when_to_use text at 1,536 characters in its skill listing. Staying under 1,024 meets both limits.
Why does Claude not use my skill?
The common causes are a description that says what the skill is but not when to use it, a frontmatter error that leaves the skill with no fields, disable-model-invocation: true, or a description dropped from the listing because you have many skills. Check them in that order before rewriting the wording.
Should a description be written in first or third person?
Third person. Anthropic's guide says to always write in third person because the description is injected into the system prompt and inconsistent point of view can cause discovery problems. "Processes Excel files" is preferred over "I can help you process Excel files."
What is the difference between description and when_to_use?
In Claude Code, description says what the skill does and when to use it. when_to_use is optional and holds extra trigger phrases or example requests. It is appended to the description in the listing, and both share the 1,536-character cap.
Can I force a skill to run instead of relying on the description?
Yes, in Claude Code you can type /skill-name to invoke a skill directly. Relying on that every time defeats the purpose of automatic skills, so use it as a check that the skill works, then fix the description.
Key takeaways
- The description is the only part of a skill Claude sees before deciding to load it, so it carries all the triggering.
- Write it in the third person, as an action followed by "Use when" and the situations, files and phrases that should bring the skill in.
- Stay under 1,024 characters and put the key use case first, because Claude Code truncates the listing at 1,536 characters.
- With many skills installed, Claude Code can drop the descriptions of the least-used ones, so keep descriptions short and prune skills you do not need.
- Write test prompts before rewriting, include prompts that should not fire the skill, and rerun the list after every change.
The bottom line
Treat the description like a search snippet for a reader who is an agent: say what the skill produces, say when it applies, and use the words people really type. Then check it with a prompt list instead of hoping. To see how other authors phrase theirs, read skill pages on Ragspaces. The description and README are visible without an account.
Related articles
- SKILL.md vs CLAUDE.md vs AGENTS.md: where standing rules go and where procedures go.
- PDF skills compared: three public PDF skills, read side by side.
- How Ragspaces works: catalog, sync and run-only skills.
About this research
Dmitry Makarenko co-founded Zipy as VP R&D, leading 50+ engineers across five countries, and now builds AI agents full-time. (LinkedIn)
This article is based on Anthropic's skill authoring best practices and Agent Skills overview, the Claude Code skills documentation, OpenAI's Codex skills documentation, and the public descriptions on Ragspaces skill pages, all read between 2026-11-23 and 2026-11-24. The before-and-after rewrites are my own illustrations. Content reviewed and updated: 2026-11-26
Keep reading
Turning a CLAUDE.md Section Into a Skill
How to move a procedure out of CLAUDE.md into a SKILL.md: pick the section, write the description, split the body, test that it fires. With a worked example.
How to Test a Skill Before Publishing It
Test a skill in three layers before you publish: does it trigger, does it follow the steps, does it beat no skill. A practical checklist with eval examples.
Progressive Disclosure in Skills: references/ and scripts/
How a skill keeps context small: name and description always load, SKILL.md on trigger, references/ and scripts/ only on demand. Patterns, limits, an example.