skills/skills-authoring/skill-frontmatter/SKILL.md
Write the YAML frontmatter for a SKILL.md file so it activates reliably — name, description, and activation keywords that the model matches against. Covers length, tone, and the most common frontmatter mistakes. Use this skill when authoring a new skill, fixing a skill that isn't auto-activating, or reviewing skills for publication. Activate when: SKILL.md frontmatter, skill description, skill activation, skill YAML, write a skill, author a skill.
npx skillsauth add latestaiagents/agent-skills skill-frontmatterInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The frontmatter is what the model reads to decide whether to load your skill. Get it wrong and the skill never fires.
---
name: kebab-case-name
description: |
Sentence 1: what the skill does.
Sentence 2: when to use it (specific trigger conditions).
Sentence 3: activation keywords (phrases users say).
---
That's it. name and description. Nothing else is required by most clients.
name Fieldmerge-conflict-surgeon, not MergeConflictSurgeonSKILL.md must have the same nameresolve-merge-conflictowasp-auditormcp-server-authoringdescription FieldThis is THE activation signal. Model reads it and matches against the user's message.
description: |
Systematic merge conflict resolution with context analysis and safe resolution.
Use this skill when the user has merge conflicts, needs help resolving conflicting changes, or is stuck on a rebase.
Activate when: merge conflict, conflict resolution, git merge failed, rebase conflict, CONFLICT markers.
tsc, Next.js, LangGraph etc. Users and models match on theseKeywords are the easiest win. Think about what the user might literally type:
Bad:
Activate when: development, coding, software.
Too vague. Matches everything → matches nothing well.
Good:
Activate when: git merge failed, CONFLICT markers, resolve conflicts, rebase conflict, auto-merge failed.
Specific phrases, variants, error strings users actually see.
Include:
prompt caching, OAuth 2.1, RAG)null pointer, CORS error)@modelcontextprotocol/sdk, LangChain)deploy, debug, refactor)name: foo but directory is bar → skill may not load| — YAML parses as a single collapsed line, loses formatting---, unquoted colonsEvery CI run should parse your frontmatter:
# Quick check
find skills -name SKILL.md -exec sh -c \
'head -n 20 "$1" | grep -A 20 "^---$" > /dev/null || echo "BAD: $1"' _ {} \;
Or a proper script:
import matter from "gray-matter";
import { readFileSync } from "fs";
const { data } = matter(readFileSync(path, "utf-8"));
if (!data.name || !data.description) throw new Error(`Missing fields: ${path}`);
if (data.description.length < 50) console.warn(`Short description: ${path}`);
name: test-generator
description: Generates tests.
Too short. No activation signal. Model never picks it.
name: test-generator
description: Generate unit tests for JavaScript and TypeScript code.
Better, but still missing WHEN and keywords.
name: test-generator
description: |
Generate unit and integration tests for JavaScript/TypeScript code using Jest or Vitest.
Use this skill when the user asks for tests, has added untested code, or needs to improve coverage.
Activate when: write tests, add tests, test coverage, generate test cases, Jest, Vitest, missing tests.
---
Now the model has enough signal to activate confidently.
development
Test skills for correct activation, content quality, and regression — both automated checks (frontmatter validity, lint) and manual verification (query-suite activation testing). Covers CI integration and how to catch skill regressions before users do. Use this skill when adding skills to a repo, setting up CI for a skill library, or debugging "the skill exists but doesn't work". Activate when: test skills, validate skills, skill CI, skill linting, skill activation test, skill regression.
development
Design skills that fire at the right moment — neither over-eager (noise) nor under-eager (silent). Covers activation specificity, trigger phrases, disambiguation between overlapping skills, and debugging activation. Use this skill when multiple skills could fire on the same query, a skill never fires, or a skill fires too often. Activate when: skill won't activate, skill over-activates, overlapping skills, skill triggers, skill selection, skill disambiguation.
development
Structure SKILL.md content so the model reads just enough — concise summary up front, progressively deeper detail, examples on demand. Covers section ordering, length budgets, when to split into multiple skills. Use this skill when writing or refactoring a skill body, one skill has grown too long, or a skill is wordy but not useful. Activate when: SKILL.md structure, skill content, skill too long, split skill, progressive disclosure, skill body.
development
OWASP A04 - XML External Entity (XXE) Prevention. Use this skill when parsing XML, processing SOAP requests, handling SVG uploads, or working with XML-based formats. Activate when: XML parsing, SOAP, SVG upload, XML input, DOCTYPE, DTD, external entity, XML bomb, billion laughs, XSLT.