SKILL.md Linter
When to use this skill
Activate when:
- A user creates or edits a SKILL.md file
- A user asks to validate, check, or review a SKILL.md
- A user asks "is my skill correct?" or "does my SKILL.md follow the spec?"
- You see a SKILL.md file with potential issues
Do NOT activate for general Markdown files, README files, or non-skill documentation.
Validation workflow
Work through this checklist in order. Report all findings at the end.
Phase 1: Frontmatter validation
- Check that the file starts with
--- and has a closing ---
- Parse the YAML frontmatter between the markers
- Validate name (required):
- Present and non-empty
- 1–64 characters
- Lowercase letters, numbers, and hyphens only
- No consecutive hyphens (
--)
- Cannot start or end with a hyphen
- Must match the containing folder name
- Regex:
^[a-z0-9]([a-z0-9-]*[a-z0-9])?$
- Validate description (required):
- Present and non-empty
- 1–1,024 characters
- Should explain WHAT the skill does AND WHEN to use it
- Warn if missing positive triggers ("Use when", "Activate when")
- Warn if missing negative triggers ("Do NOT use for")
- Validate compatibility (optional):
- If present, must be ≤500 characters
- Validate metadata (optional):
- If present, should be a key-value mapping
Phase 2: Body structure check
- Check for recommended sections in the body (after frontmatter):
## When to use this skill — clarifies activation
- A workflow/checklist section — numbered steps
## Gotchas — non-obvious facts
- An output template or format section — concrete examples
- Warn if body exceeds ~500 lines (recommend progressive disclosure)
- Check for
references/ or scripts/ pointers if body is long
Phase 3: Description quality scoring
- Score the description (max 7 points):
- +2 if has positive triggers ("Use when", "Activate when", "Use for")
- +2 if has negative triggers ("Do NOT", "Not for")
- +1 if length is 50–500 characters
- +1 if contains action verbs (extract, generate, deploy, review, etc.)
- +1 if contains specific keywords (.pdf, API, Python, SQL, etc.)
- Rate: 6-7 Excellent, 4-5 Good, 2-3 Needs work, 0-1 Poor
Output format
ALWAYS use this exact structure for validation reports:
## SKILL.md Validation Report: [skill-name]
### Frontmatter
- [PASS/FAIL] name: [details]
- [PASS/FAIL] description: [details]
- [PASS/WARN/N/A] compatibility: [details]
- [PASS/N/A] metadata: [details]
### Body Structure
- [FOUND/MISSING] "When to use" section
- [FOUND/MISSING] Workflow/checklist section
- [FOUND/MISSING] Gotchas section
- [FOUND/MISSING] Output template
### Description Quality
Score: X/7 — [Rating]
[Feedback items]
### Summary
[VALID/INVALID] — [N] errors, [N] warnings
[List of actions to fix, if any]
Gotchas
- The
name field MUST match the folder name exactly — my-skill/SKILL.md must have name: my-skill
- A valid YAML frontmatter that is missing
name or description is still INVALID per the spec
- Descriptions that only say what the skill does but not WHEN to use it will under-trigger — agents won't activate the skill
- Consecutive hyphens in names (
my--skill) are invalid even though YAML accepts them
- The
--- markers must be on their own lines with no leading whitespace
1---2name: skill-md-linter3description: Validate SKILL.md files against the official specification. Checks frontmatter fields (name format, description quality, required fields) and body structure (recommended sections, gotchas, output templates). Use when creating, editing, or reviewing SKILL.md files. Also use when a student asks "is my SKILL.md correct?" Do NOT use for general Markdown linting or non-skill documentation.4license: Proprietary5---67# SKILL.md Linter89## When to use this skill10Activate when:11- A user creates or edits a SKILL.md file12- A user asks to validate, check, or review a SKILL.md13- A user asks "is my skill correct?" or "does my SKILL.md follow the spec?"14- You see a SKILL.md file with potential issues1516Do NOT activate for general Markdown files, README files, or non-skill documentation.1718## Validation workflow1920Work through this checklist in order. Report all findings at the end.2122### Phase 1: Frontmatter validation231. Check that the file starts with `---` and has a closing `---`242. Parse the YAML frontmatter between the markers253. Validate **name** (required):26 - Present and non-empty27 - 1–64 characters28 - Lowercase letters, numbers, and hyphens only29 - No consecutive hyphens (`--`)30 - Cannot start or end with a hyphen31 - Must match the containing folder name32 - Regex: `^[a-z0-9]([a-z0-9-]*[a-z0-9])?$`334. Validate **description** (required):34 - Present and non-empty35 - 1–1,024 characters36 - Should explain WHAT the skill does AND WHEN to use it37 - Warn if missing positive triggers ("Use when", "Activate when")38 - Warn if missing negative triggers ("Do NOT use for")395. Validate **compatibility** (optional):40 - If present, must be ≤500 characters416. Validate **metadata** (optional):42 - If present, should be a key-value mapping4344### Phase 2: Body structure check457. Check for recommended sections in the body (after frontmatter):46 - `## When to use this skill` — clarifies activation47 - A workflow/checklist section — numbered steps48 - `## Gotchas` — non-obvious facts49 - An output template or format section — concrete examples508. Warn if body exceeds ~500 lines (recommend progressive disclosure)519. Check for `references/` or `scripts/` pointers if body is long5253### Phase 3: Description quality scoring5410. Score the description (max 7 points):55 - +2 if has positive triggers ("Use when", "Activate when", "Use for")56 - +2 if has negative triggers ("Do NOT", "Not for")57 - +1 if length is 50–500 characters58 - +1 if contains action verbs (extract, generate, deploy, review, etc.)59 - +1 if contains specific keywords (.pdf, API, Python, SQL, etc.)6011. Rate: 6-7 Excellent, 4-5 Good, 2-3 Needs work, 0-1 Poor6162## Output format6364ALWAYS use this exact structure for validation reports:6566```67## SKILL.md Validation Report: [skill-name]6869### Frontmatter70- [PASS/FAIL] name: [details]71- [PASS/FAIL] description: [details]72- [PASS/WARN/N/A] compatibility: [details]73- [PASS/N/A] metadata: [details]7475### Body Structure76- [FOUND/MISSING] "When to use" section77- [FOUND/MISSING] Workflow/checklist section78- [FOUND/MISSING] Gotchas section79- [FOUND/MISSING] Output template8081### Description Quality82Score: X/7 — [Rating]83[Feedback items]8485### Summary86[VALID/INVALID] — [N] errors, [N] warnings87[List of actions to fix, if any]88```8990## Gotchas91- The `name` field MUST match the folder name exactly — `my-skill/SKILL.md` must have `name: my-skill`92- A valid YAML frontmatter that is missing `name` or `description` is still INVALID per the spec93- Descriptions that only say what the skill does but not WHEN to use it will under-trigger — agents won't activate the skill94- Consecutive hyphens in names (`my--skill`) are invalid even though YAML accepts them95- The `---` markers must be on their own lines with no leading whitespace