Table of Contents

Method LoadAndRegisterAsync

Namespace
LMKit.Agents.Skills
Assembly
LM-Kit.NET.dll

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

url string

The URL to the SKILL.md file or ZIP archive.

registry SkillRegistry

The registry to add loaded skills to.

overwrite bool

Whether to overwrite existing skills.

cancellationToken CancellationToken

A token to cancel the operation.

Returns

Task<int>

The number of skills loaded and registered.

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");