Skip to content
mercury framework
GitHub

parseSkill

parseSkill(markdown): Skill

Defined in: types/plugin-types/index.ts:332

Parses the Anthropic Agent Skills SKILL.md shape — frontmatter fenced by --- lines carrying at least name and description, then the markdown body — into a Skill. A deliberately tiny hand-rolled parser (no yaml dependency, so this package stays dependency-free): it reads only name and description from the frontmatter and takes everything after the closing fence as the body verbatim. Throws when the frontmatter or either required field is missing, so a malformed skill fails loudly at load.

string

Skill