Table of Contents

👉 Try the demo: https://github.com/LM-Kit/lm-kit-net-samples/tree/main/console_net/agents/skill_based_assistant

Skill-Based Assistant for C# .NET Applications


Purpose of the Sample

Skill-Based Assistant demonstrates how to use LM-Kit.NET to enhance AI assistants with Agent Skills - reusable, shareable instruction sets that follow the agentskills.io specification.

The sample shows how to:

  • Load skills from SKILL.md files (structured markdown format).
  • Register skills using SkillRegistry.
  • Activate skills with SkillActivator.
  • Create tool wrappers with SkillTool.
  • Dynamically switch between multiple specialized skills.

Why Agent Skills with LM-Kit.NET?

  • Reusability: skills can be shared across projects and teams.
  • Specialization: each skill focuses on specific tasks (code review, writing, analysis).
  • Modularity: add or remove skills without modifying core code.
  • Standardization: follows the agentskills.io open specification.
  • Local-first: all skill processing runs on your hardware.

Sample Application Description

Console app that:

  • Loads multiple SKILL.md files from a skills folder.
  • Creates a SkillRegistry with all discovered skills.
  • Allows users to activate different skills during conversation.
  • Demonstrates skill switching for specialized tasks.
  • Shows how skills enhance the assistant's capabilities.

Key Features

  • SKILL.md Format: structured markdown files defining skills.
  • Dynamic Activation: switch skills at runtime.
  • Skill Discovery: automatic loading from folder.
  • Tool Integration: skills work with the tool-calling system.

SKILL.md File Format

Skills are defined in markdown files with special sections:

# Skill Name

## Description
Brief description of what this skill does.

## Instructions
Step-by-step instructions for the AI to follow.

## Examples
Example inputs and expected outputs.

## Constraints
Limitations and boundaries for the skill.

Example Skills

The demo includes several built-in skills:

Skill Purpose
Code Reviewer Analyze code for issues, suggest improvements
Technical Writer Write documentation and technical content
Data Analyst Interpret data and provide insights

Getting Started

Prerequisites

  • .NET 8.0 or later
  • VRAM for selected model (4-11 GB)

Run

cd demos/console_net/agents/skill_based_assistant
dotnet build
dotnet run

Additional Resources