pub fn parse_skill_file(content: &str) -> Result<Skill>Expand description
Parse a skill file content into frontmatter and body.
The file format is:
---
name: skill-name
description: Optional description
tools: [tool1, tool2]
---
# Markdown content here
This becomes the system prompt.§Compatibility
This parser supports multiple skill file formats:
- Claude Code: Standard YAML frontmatter + markdown body
- Cursor: Similar format, may use
titleinstead ofname - Amp: May include
system_promptorinstructionsin frontmatter - Codex: May use
idinstead ofname
§Errors
Returns an error if:
- The file doesn’t start with
--- - The YAML frontmatter is invalid
- Required fields are missing (must have
name,id, ortitle)