Method ParseContent
ParseContent(string, string)
Parses SKILL.md content from a string.
public static (SkillMetadata Metadata, string Instructions) ParseContent(string content, string skillPath = null)
Parameters
contentstringThe raw content of the SKILL.md file.
skillPathstringThe path to the skill directory (for error messages).
Returns
- (SkillMetadata Metadata, string Instructions)
A tuple containing the parsed metadata and the Markdown instructions.
Examples
Parsing skill content from a string:
string content = @"---
name: my-skill
description: My custom skill
---
# Instructions
Follow these steps...";
var (metadata, instructions) = SkillParser.ParseContent(content);
Console.WriteLine($"Name: {metadata.Name}");
Exceptions
- SkillParseException
Thrown when the content cannot be parsed.