Method GetResource
GetResource(string)
Gets a resource by its relative path.
public SkillResource GetResource(string relativePath)
Parameters
relativePathstringThe relative path to the resource (e.g.,
scripts/validate.py).
Returns
- SkillResource
The resource if found; otherwise,
null.
Examples
Loading a specific resource by path:
var skill = AgentSkill.Load("./skills/api-designer");
var template = skill.GetResource("templates/openapi.yaml");
if (template != null)
{
string content = template.GetContent();
Console.WriteLine(content);
}