Table of Contents

Method ParseContent

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

ParseContent(string, string)

Parses SKILL.md content from a string.

public static (SkillMetadata Metadata, string Instructions) ParseContent(string content, string skillPath = null)

Parameters

content string

The raw content of the SKILL.md file.

skillPath string

The path to the skill directory (for error messages).

Returns

(SkillMetadata Metadata, string Instructions)

A tuple containing the parsed metadata and the Markdown instructions.

Examples

Parsing skill content from a string:

string content = @"---
name: my-skill
description: My custom skill
---
# Instructions
Follow these steps...";

var (metadata, instructions) = SkillParser.ParseContent(content);
Console.WriteLine($"Name: {metadata.Name}");

Exceptions

SkillParseException

Thrown when the content cannot be parsed.