Table of Contents

Method LoadFromGitHubAsync

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

LoadFromGitHubAsync(string, string, string, string, CancellationToken)

Loads a skill from a GitHub repository.

public Task<AgentSkill> LoadFromGitHubAsync(string owner, string repo, string path, string branch = "main", CancellationToken cancellationToken = default)

Parameters

owner string

The repository owner (username or organization).

repo string

The repository name.

path string

The path to the skill directory within the repository.

branch string

The branch name. Defaults to "main".

cancellationToken CancellationToken

A token to cancel the operation.

Returns

Task<AgentSkill>

The loaded skill.

Examples

Loading a skill from GitHub:

using var loader = new SkillRemoteLoader();
var skill = await loader.LoadFromGitHubAsync(
    owner: "myorg",
    repo: "skills-library",
    path: "skills/code-review",
    branch: "main");
Console.WriteLine($"Loaded from GitHub: {skill.Name}");

Exceptions

ArgumentNullException

Thrown when required parameters are null or empty.

HttpRequestException

Thrown when the HTTP request fails.

SkillParseException

Thrown when the skill cannot be parsed.