Method Load
Load(string)
Loads an Agent Skill from a directory containing a SKILL.md file.
public static AgentSkill Load(string skillPath)
Parameters
skillPathstringThe path to the skill directory. Must contain a SKILL.md file.
Returns
- AgentSkill
The loaded Agent Skill.
Examples
Loading a skill from a local directory:
var skill = AgentSkill.Load("./skills/code-review");
Console.WriteLine($"Loaded: {skill.Name}");
Console.WriteLine($"Description: {skill.Description}");
Exceptions
- ArgumentNullException
Thrown when
skillPathisnull.- DirectoryNotFoundException
Thrown when the specified directory does not exist.
- FileNotFoundException
Thrown when SKILL.md is not found in the specified directory.
- SkillParseException
Thrown when the SKILL.md file cannot be parsed.