SkillHub

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 the SKILL.md body — are warnings, not errors: an over-long description publishes once you acknowledge it with --allow-warnings (see publish).

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-skill

JSON output

With --json, the data object contains:

  • dir, valid (bool).
  • errors[] and warnings[] — each { severity: error | warning, code, message, path (string|null), line (int|null) }.

On this page