Skip to content

AgentSkillsDotNet

Rasmus Wulff Jensen edited this page May 20, 2026 · 1 revision

AgentSkillsDotNet

AgentSkillsDotNet is a C# implementation of the AgentSkills format. It can be used as part of Agent Framework Toolkit or on its own.

Package

dotnet add package AgentSkillsDotNet

Quick start

AgentSkillsFactory agentSkillsFactory = new();
AgentSkills agentSkills = agentSkillsFactory.GetAgentSkills("<FolderWithSkillsAsSubFolders>");

IList<AgentSkill> skills = agentSkills.Skills;
IList<AITool> tools = agentSkills.GetAsTools();
string instructions = agentSkills.GetInstructions();
IList<string> log = agentSkills.ExcludedSkillsLog;

Dependency injection

builder.Services.AddAgentSkillsFactory();

Loading skills with options

AgentSkills agentSkills = agentSkillsFactory.GetAgentSkills("<FolderWithSkillsAsSubFolders>", new AgentSkillsOptions
{
    ValidationRules = AgentSkillsOptionsValidationRule.Loose,
    Filter = skill => skill.ScriptFiles.Length == 0
});

Exposing skills as tools

IList<AITool> tools1 = agentSkills.GetAsTools(
    AgentSkillsAsToolsStrategy.AvailableSkillsAndLookupTools);

IList<AITool> tools2 = agentSkills.GetAsTools(
    AgentSkillsAsToolsStrategy.EachSkillAsATool);

AvailableSkillsAndLookupTools exposes lookup-style tools such as getting available skills and retrieving a skill by name. EachSkillAsATool exposes each skill as a separate tool.

Working with raw skills

foreach (AgentSkill skill in agentSkills.Skills)
{
    AgentSkillValidationResult validationResult = skill.GetValidationResult();
    string definition = skill.GenerateDefinition(new AgentSkillAsToolOptions());
    AITool tool = skill.AsAITool(new AgentSkillAsToolOptions());
}

Notes

  • See AIToolsFactory for loading AgentSkills through the toolkit tools package.
  • AgentSkills can return available-skill instructions in an XML-style structure through GetInstructions().

Clone this wiki locally