Method GetResourceContent
GetResourceContent(AgentSkill, string)
Gets a resource's content from a skill, loading it on demand.
public string GetResourceContent(AgentSkill skill, string relativePath)
Parameters
skillAgentSkillThe skill containing the resource.
relativePathstringThe relative path to the resource.
Returns
- string
The resource content, or
nullif not found.
Examples
Loading a resource from a skill:
var skill = AgentSkill.Load("./skills/api-designer");
var activator = new SkillActivator();
string template = activator.GetResourceContent(skill, "templates/openapi.yaml");
if (template != null)
{
Console.WriteLine(template);
}