Table of Contents

Class SkillTool

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

An ITool implementation that exposes Agent Skills to models.

When invoked, this tool activates a specified skill and returns its instructions for the agent to follow. The tool description dynamically lists all available skills, implementing progressive disclosure.

public sealed class SkillTool : ITool
Inheritance
SkillTool
Implements
Inherited Members

Remarks

Tool Behavior
The SkillTool enables LLMs to discover and activate skills through function calling:

  1. The tool's description lists all available skill names and their purposes.
  2. When the LLM calls the tool with a skill name, the full instructions are returned.
  3. The LLM then follows those instructions to complete the task.

Usage

var skillRegistry = new SkillRegistry();
skillRegistry.LoadFromDirectory("./skills");

var skillTool = new SkillTool(skillRegistry);
conversation.Tools.Register(skillTool);

// The LLM can now discover and activate skills through function calling

Constructors

SkillTool(SkillRegistry, string)

Initializes a new instance of the SkillTool class.

Fields

DefaultName

Gets the default name for the skill tool.

Properties

Description

Gets a concise description of what the tool does.

InputSchema

Gets the JSON Schema defining the expected input arguments.

Name

Gets the stable, unique identifier for this tool.

Methods

InvokeAsync(string, CancellationToken)

Executes the tool with the specified JSON arguments.

Events

SkillActivated

Occurs when a skill is activated through this tool.