validate
Validate a skill directory against the skill spec — frontmatter, name/dir match, size limits, path safety, and broken links.
skillhub validate checks a skill directory against the skill spec: frontmatter
fields, that the name matches the directory, size limits, path safety, and
broken relative links. It prints any errors and warnings it finds. Runs against
the current directory if you don't pass one.
Errors versus warnings
The distinction matters, because only one of the two stops a publish.
- Errors are shape violations the registry cannot store: a missing or
malformed
name, a name that doesn't match its directory, a field of the wrong type, an unsafe path. - Warnings are benign. The content-length caps — on
description,license,compatibility, and theSKILL.mdbody — are warnings, not errors: an over-long description publishes once you acknowledge it with--allow-warnings(seepublish).
Unknown top-level frontmatter fields are neither. A key outside the spec's
six is carried through rather than rejected, so a SKILL.md written for another
tool validates here instead of failing on a field this spec has never heard of.
Synopsis
skillhub validate [dir]Examples
skillhub validate
skillhub validate ./my-skillJSON output
With --json, the data object contains:
dir,valid(bool).errors[]andwarnings[]— each{ severity: error | warning, code, message, path (string|null), line (int|null) }.