Table of Contents

Method Register

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

Register(AgentSkill, bool)

Registers a skill in the registry.

public void Register(AgentSkill skill, bool overwrite = false)

Parameters

skill AgentSkill

The skill to register.

overwrite bool

When true, replaces any existing skill with the same name. When false, throws if a skill with the same name exists.

Examples

Registering individual skills:

var registry = new SkillRegistry();
var skill = AgentSkill.Load("./skills/code-review");

// Register a new skill
registry.Register(skill);

// Update an existing skill
var updatedSkill = AgentSkill.Load("./skills/code-review-v2");
registry.Register(updatedSkill, overwrite: true);

Exceptions

ArgumentNullException

Thrown when skill is null.

InvalidOperationException

Thrown when a skill with the same name exists and overwrite is false.