agent-skills 0.2.0

Parse, validate, and work with Agent Skills as defined by the Agent Skills specification
Documentation

agent-skills

Parse, validate, and work with Agent Skills—the open standard for AI agent instruction packages.

Installation

cargo add agent-skills

Usage

Parse skill content directly or load a complete skill directory.

Parse SKILL.md Content

use agent_skills::Skill;

let content = r#"---
name: my-skill
description: Does something useful.
---
# Instructions
Follow these steps...
"#;

let skill = Skill::parse(content)?;
assert_eq!(skill.name().as_str(), "my-skill");

Load a Skill Directory

use agent_skills::SkillDirectory;
use std::path::Path;

let dir = SkillDirectory::load(Path::new("./my-skill"))?;
let skill = dir.skill();

println!("Name: {}", skill.name());
println!("Description: {}", skill.description());

Validation occurs automatically during parsing. Invalid skills return descriptive errors.

Key Types

Type Purpose
Skill A parsed skill with frontmatter and body
SkillDirectory A loaded skill directory with file access
Frontmatter YAML metadata (name, description, license, etc.)
SkillName A validated skill name
SkillDescription A validated description

Specification

This crate implements the Agent Skills specification.

License

MIT