Method ParseMetadataOnly
ParseMetadataOnly(string)
Extracts only the metadata from a SKILL.md file without loading instructions.
This is useful for discovery operations where only the name and description are needed to decide whether to activate a skill.
public static SkillMetadata ParseMetadataOnly(string skillPath)
Parameters
skillPathstringThe path to the skill directory.
Returns
- SkillMetadata
The parsed metadata.
Examples
Quick metadata extraction for discovery:
var metadata = SkillParser.ParseMetadataOnly("./skills/code-review");
Console.WriteLine($"Name: {metadata.Name}");
Console.WriteLine($"Description: {metadata.Description}");
Exceptions
- ArgumentNullException
Thrown when
skillPathisnull.- FileNotFoundException
Thrown when SKILL.md is not found.
- SkillParseException
Thrown when the frontmatter cannot be parsed.