Method LoadFromUrlAsync
LoadFromUrlAsync(string, CancellationToken)
Loads a skill from a direct SKILL.md URL.
public Task<AgentSkill> LoadFromUrlAsync(string url, CancellationToken cancellationToken = default)
Parameters
urlstringThe URL to the SKILL.md file.
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task<AgentSkill>
The loaded skill.
Examples
Loading a skill from a direct URL:
using var loader = new SkillRemoteLoader();
var skill = await loader.LoadFromUrlAsync(
"https://example.com/skills/code-review/SKILL.md");
Console.WriteLine($"Loaded: {skill.Name}");
Exceptions
- ArgumentNullException
Thrown when
urlisnull.- HttpRequestException
Thrown when the HTTP request fails.
- SkillParseException
Thrown when the skill content cannot be parsed.