Class SkillParser
Parses SKILL.md files according to the Agent Skills specification.
This parser extracts YAML frontmatter (metadata) and Markdown content (instructions) from SKILL.md files.
public static class SkillParser
- Inheritance
-
SkillParser
- Inherited Members
Remarks
SKILL.md Format
A valid SKILL.md file has this structure:
---
name: skill-name
description: What this skill does and when to use it.
---
Skill Instructions
Your detailed instructions, guidelines, and examples go here...
Thread Safety
All methods on this class are thread-safe and can be called concurrently.
Fields
- SkillFileName
The expected filename for skill definitions.
Methods
- IsSkillDirectory(string)
Checks if a directory contains a valid skill (has a SKILL.md file).
- Parse(string)
Parses a skill from the specified directory.
- ParseAsync(string, CancellationToken)
Asynchronously parses a skill from the specified directory.
- ParseContent(string, string)
Parses SKILL.md content from a string.
- 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.