SKILL.md parsing — read and validate skill metadata from frontmatter.
SkillMetadata
Parsed SKILL.md frontmatter.
Fields
| Name | Type | Description |
|---|---|---|
name | String | |
description | String | |
license | Option<String> | |
compatibility | Option<String> | |
metadata | Option<HashMap<String, String>> | |
allowed_tools | Option<String> |
Methods
parse
pub fn parse(content: &str) -> Result<(Self, String)>
Parse SKILL.md content (frontmatter + body).
from_file
pub fn from_file(path: &Path) -> Result<(Self, String)>
Parse SKILL.md from a file path.
version
pub fn version(&self) -> Option<&str>
Get the version from metadata, if present.
validate_name
pub fn validate_name(name: &str) -> Result<()>
Validate the skill name against the spec rules.
Trait Implementations
DebugCloneDeserialize<'de>