Write a SKILL.md for an Agent Skill That Actually Triggers
For when your Agent Skill works when you call it by name but never fires on its own, or fires on everything. Describe a task you really repeat, the steps and commands you follow and the gotchas you learned the hard way. It writes the SKILL.md with a valid name, a description built around the phrases you actually type, numbered steps with a checkpoint before any write, and should-fire and near-miss test requests to check it.

You are a senior engineer who writes Agent Skills (SKILL.md files) for Claude Code, Claude and other agents that load the Agent Skills format. I want a SKILL.md that captures a task I actually repeat, or something I learned the hard way, so the agent does it my way without me re-explaining it every session. I do not want a generic skill about a topic the model already knows; that is a thinking block with extra steps. My past attempts had the usual problems: the skill works when I call it by name but never fires on its own, or it fires on everything; the description reads like documentation ("Release management helpers") instead of matching what I actually type; and the body is either one vague line or a wall of text.
HARD RULES:
1. CAPTURE, DO NOT INVENT. Build the skill only from the steps, commands, paths, gotchas and examples I give you. If I only name a topic and give no real procedure, stop and ask for one instead of writing general advice. If a detail is missing, write [CONFIRM: ...] rather than filling it with a typical default.
2. THE DESCRIPTION IS THE TRIGGER. The agent decides whether to load the skill from the name and description alone, matching them against the conversation, not the skill's intent. So the description says what the skill does AND when to use it, front-loads the phrases I actually say (from my answers), names the file types or tools involved, and lists contexts where it applies even if I do not name the domain. Third person by default ("Drafts weekly release notes...", never "I can help you"). Non-empty, under 1024 characters, and specific enough not to fire on near-misses: never "use for anything git-related".
3. NO "WHEN TO USE" SECTION IN THE BODY. The body only loads after the skill has triggered, so trigger conditions belong in the description, not in a body heading.
4. VALID NAME. Lowercase letters, numbers and hyphens only, max 64 characters, no leading or trailing hyphen, no "--", no "anthropic" or "claude", and identical to the folder name. Prefer a gerund (processing-invoices, writing-release-notes). Never "helper", "utils" or "tools".
5. FRONTMATTER THAT PARSES. The file starts with --- on line 1, plain YAML, closed with ---, nothing before it. Malformed frontmatter can fail silently: the skill still runs by name but never matches automatically.
6. ONLY WHAT THE AGENT LACKS. The model is already very capable. Cut explanations of things it knows (what semver is, how git works) and keep my project-specific steps, commands and gotchas. Keep the body under 500 lines; aim for far less.
7. BODY SHAPE. A one-sentence purpose, then numbered steps, a checkpoint that shows me the result and waits before any write, commit or other irreversible step, one concrete input/output example, the edge cases I listed, an output template if the result has a fixed format, and a validate-then-fix loop where a check exists.
8. RIGHT DEGREE OF FREEDOM. Fragile or exact operations get the exact command. Judgment calls get short guidance. Give one default tool or approach with an escape hatch, not a menu of options. Use the same term for the same thing throughout. No dates or "currently" statements that will go stale.
9. PROGRESSIVE DISCLOSURE. Long reference material (schemas, label maps, style rules) goes in separate files under references/, linked one level deep from SKILL.md with a "read when <condition>" line. Reference files over 100 lines get a table of contents. For scripts/, say whether the agent should run or read each one, list its dependencies instead of assuming they are installed, and use forward slashes in every path.
10. SIDE EFFECTS STAY MANUAL. If the skill deploys, commits, publishes, sends or deletes anything, recommend disable-model-invocation: true so it only runs when I call it by name, and note that this field and allowed-tools are Claude Code-specific. Do not add allowed-tools unless I ask.
BEFORE WRITING, ask me these in one short batch and STOP:
1. The task this skill captures, how often you do it, and 3 to 5 phrases you would actually type to ask for it.
2. The steps you follow, in order, with the exact commands, scripts, file paths and tools.
3. The gotchas: what goes wrong, what you learned the hard way, and what the agent gets wrong when you do not guide it.
4. What a good finished result looks like (paste one if you can).
5. Nearby requests that should NOT trigger this skill, and any skills you already have whose descriptions might overlap with it.
6. Which agent you use it in (Claude Code, Claude apps, the API, another tool), and whether it writes, commits, deploys or sends anything.
7. Any reference material or scripts that should ship with it (paste them or describe them).
Then reply using exactly these sections:
FOLDER: the skill's folder tree (skill-name/SKILL.md plus any references/, scripts/ or assets/ files), and where to put it for my agent.
SKILL.MD: the complete file, frontmatter included, in one markdown code block.
SUPPORTING FILES: each references/ or scripts/ file as its path on one line followed by its contents in its own code block, or "none needed".
DESCRIPTION CHECK: the description's character count, which of my trigger phrases it covers, and which near-misses it deliberately excludes.
TRIGGER TESTS: 10 test requests built from my answers: 5 that should load the skill and 5 near-misses that should not. Tell me to run each in a fresh session, and that a very simple one-step request may be handled without consulting any skill.
LINE COUNT: lines in SKILL.md.
CUT AND WHY: everything from my input you left out, one line each, with the reason (model already knows it, belongs in a reference file, duplicate, time-sensitive).
CONFIRM: every [CONFIRM] placeholder still in the files.
IF IT NEVER FIRES: 3 short checks in order: frontmatter on line 1 with no stray characters, description wording against the phrases I actually use, and overlap with my other skills.
Plain text outside the code blocks, no intro, no pep talk.
Here are my details (answer what you can now, or leave blank and answer the questions):
The task I repeat: [FILL IN]
Steps, commands and paths: [FILL IN]
Gotchas and hard-won lessons: [FILL IN]
Agent I use: [FILL IN]
Start with the questions.How to use this chat prompt
Paste it directly into a new chat, replace anything in [BRACKETS] with your context, and send. Re-use it whenever the task comes up, or save it as a text-expander snippet.
Example output
Weekly release notes from merged PRs in Claude Code: steps, gh commands, two gotchas and four trigger phrases supplied.
name: release-notes-helper
description: Helps with release notes and changelogs.
## When to use: whenever the user is working on a release. Follow semantic versioning best practices.
FOLDER: .claude/skills/writing-release-notes/SKILL.md, references/label-map.md
SKILL.MD: description: Drafts weekly release notes from merged PRs. Use when the user asks for release notes, a changelog, or what shipped this week.
## Steps: 1. Run `gh pr list --state merged`. 2. Group by label (read references/label-map.md when a label is unknown). 3. Show the draft and wait before editing CHANGELOG.md.
DESCRIPTION CHECK: 126 characters; excludes version bumps and tagging.
TRIGGER TESTS: fire on "what shipped this week?"; stay quiet on "bump the version to 2.4".
CUT AND WHY: explanation of semver (the model already knows it).
FAQ
Frequently asked questions
What is a SKILL.md file, and where does it go?
It is the instructions file at the heart of an Agent Skill: a folder named after the skill, containing SKILL.md with YAML frontmatter (a required name and description) and a Markdown body of steps, plus optional scripts/, references/ and assets/ folders. The agent loads only the name and description at startup and reads the body when a task matches. In Claude Code, project skills live in .claude/skills/<skill-name>/SKILL.md and personal ones in ~/.claude/skills/. The format is published as an open specification at agentskills.io, so check your own agent's docs for where it looks.
What does a good SKILL.md example look like?
A short file with a gerund name that matches its folder (writing-release-notes), a description that says what the skill does and when to use it in the words you actually type, then numbered steps, a checkpoint before anything is written, one concrete example and the edge cases you have hit. The weak version is a vague description like "Helps with documents" over a one-line body. The best examples capture a task you genuinely repeat; a skill generated from a topic alone tends to restate what the model already knows, which is why the prompt asks for your real steps and gotchas first.
Why is my skill not triggering?
Usually the description. If the skill works when you call it by name but never on its own, the description probably describes a domain ("release management helpers") instead of the moment you ask for it, so rewrite it around your real phrases. Also check the frontmatter starts on line 1 and parses, since malformed frontmatter can fail without any error. Overly broad descriptions cause the opposite problem and can crowd out your other skills. Finally, agents tend to skip skills for simple one-step requests they can handle alone, so test with realistic multi-step requests in a fresh session.
How long can a SKILL.md be?
The guidance is to keep the body under 500 lines, and the description has a 1024-character limit while the name is capped at 64 characters. Shorter is usually better: only the name and description are loaded for every skill up front, and the body competes for context once it loads. Move long reference material into separate files linked one level deep from SKILL.md, and paste the finished file into a Markdown previewer to check the frontmatter and code blocks render cleanly.
What is the difference between SKILL.md, CLAUDE.md and AGENTS.md?
CLAUDE.md and AGENTS.md are loaded every session and hold rules that apply to most work in a repo: commands, conventions, things never to do. A skill loads on demand, only when its description matches the task, so it suits a specific procedure you repeat now and then. If a rule should apply to everything, put it in your repo file with the CLAUDE.md generator; if it is a multi-step workflow for one kind of task, make it a skill.
Keep going
What's next
Collection
AI Agent & Markdown Files
For the instruction files coding agents read before they touch your repo: a CLAUDE.md that Claude Code actually follows, an AGENTS.md that works across Codex, Cursor and Claude, project rules files, and the build, test and style notes you keep repeating in every chat.
Tool
Markdown Live Preview
Paste markdown or drop a .md file and see it rendered instantly. Nothing leaves your browser.
Prompt
Generate a CLAUDE.md for Your Repo That Claude Code Actually Follows
For when Claude Code keeps making the same mistakes in your repo even though the rule is right there in CLAUDE.md. Give it your real commands, the parts of the structure that aren't obvious from the code, and the mistakes you keep correcting. It writes a short CLAUDE.md of specific rules with the important ones first, lists what it cut and why, and flags the never-break rules that belong in a hook or linter config instead of a polite request.