Method LoadAndRegisterAsync
LoadAndRegisterAsync(string, SkillRegistry, bool, CancellationToken)
Loads and registers skills from a remote URL directly into a registry.
public Task<int> LoadAndRegisterAsync(string url, SkillRegistry registry, bool overwrite = false, CancellationToken cancellationToken = default)
Parameters
urlstringThe URL to the SKILL.md file or ZIP archive.
registrySkillRegistryThe registry to add loaded skills to.
overwriteboolWhether to overwrite existing skills.
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
Examples
Loading and registering skills in one step:
var registry = new SkillRegistry();
using var loader = new SkillRemoteLoader();
int count = await loader.LoadAndRegisterAsync(
"https://example.com/skills/code-review/SKILL.md",
registry);
Console.WriteLine($"Registered {count} skills");