Skip to main content

parse_skill_md

Function parse_skill_md 

Source
fn parse_skill_md(content: &str) -> Option<ParsedSkill>
Expand description

Parse a SKILL.md file (render_skill_md’s exact output shape, and nothing more general — this is not a YAML parser, just the inverse of the one writer this codebase has). Expects exactly: ---\nname: "<json-string>"\ndescription: "<json-string>"\n---\n\n<body>. Returns None for anything that doesn’t match — a real Agent Skills SKILL.md from elsewhere in the ecosystem may use additional frontmatter fields or different quoting; broadening this to a general YAML parser is a follow-up, not silently guessed at here (mirrors the exporter’s own documented server.json scope decision).