Table of Contents

Class SkillMetadata

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

Represents the YAML frontmatter metadata from a SKILL.md file.

This class captures both required and optional fields as defined in the Agent Skills specification.

public sealed class SkillMetadata
Inheritance
SkillMetadata
Inherited Members

Remarks

Required Fields

  • Name: Unique identifier (max 64 chars, lowercase with hyphens).
  • Description: What the skill does and when to use it (max 1024 chars).

Optional Fields

  • License: License name or reference to bundled license file.
  • Compatibility: Environment requirements (max 500 chars).
  • AllowedTools: Space-delimited list of pre-approved tools.
  • CustomMetadata: Arbitrary key-value pairs for additional metadata.

Fields

MaxCompatibilityLength

Maximum allowed length for the compatibility field.

MaxDescriptionLength

Maximum allowed length for the skill description.

MaxNameLength

Maximum allowed length for the skill name.

Properties

Agent

Gets or sets the preferred agent type for executing this skill.

Optional. Examples: Explore, Plan, or a custom subagent name.

AllowedTools

Gets or sets a space-delimited list of pre-approved tools.

Optional. Experimental. Support may vary between agent implementations. Tools listed here may be granted access without per-use approval when the skill is active.

Author

Gets the author from custom metadata, if present.

Compatibility

Gets or sets environment requirements for this skill.

Optional. Max 500 characters. Can indicate intended product, required system packages, network access needs, etc.

Context

Gets or sets the execution context for this skill.

Optional. Values include fork (run in isolated subagent) or inline (run in current context). Default is inline.

CustomMetadata

Gets or sets arbitrary key-value metadata for this skill.

Optional. Common keys include author, tags, category.

Description

Gets or sets a description of what this skill does and when to use it.

Required. Max 1024 characters. This is the primary signal agents use to determine when to invoke the skill.

DisableModelInvocation

Gets or sets a value indicating whether the model should be prevented from automatically invoking this skill.

Optional. When true, the skill can only be invoked explicitly by the user via a slash command.

IsMode

Gets or sets a value indicating whether this skill is a "mode command" that modifies the agent's behavior or context.

Optional. When true, the skill appears in a special "Mode Commands" section, making it prominent for skills like debug-mode or expert-mode.

License

Gets or sets the license name or reference to a bundled license file.

Optional. Recommended to keep it short (e.g., MIT, Apache-2.0).

Model

Gets or sets the preferred model for this skill.

Optional. When specified, the skill may request execution with a specific model (e.g., claude-opus-4-20250514). Use inherit to use the session's current model.

Name

Gets or sets the unique identifier for this skill.

Required. Max 64 characters. Lowercase letters, numbers, and hyphens only. Must not start or end with a hyphen.

Tags

Gets the tags from custom metadata, if present.

Version

Gets or sets the version of this skill.

Optional. Semantic versioning recommended (e.g., 1.0.0).

Methods

GetAllowedToolsList()

Parses the allowed tools string into individual tool specifications.

IsValidSkillName(string)

Validates the skill name format according to the specification.

Validate(out IReadOnlyList<string>)

Validates the metadata according to the Agent Skills specification.