abu_skill/model.rs
1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone)]
4pub struct Skill {
5 pub frontmatter: SkillFrontmatter,
6 pub body: String,
7
8}
9
10/// Frontmatter metadata for a skill.
11/// https://agentskills.io/specification
12#[derive(Debug, Clone, Default, Serialize, Deserialize)]
13#[serde(default)]
14pub struct SkillFrontmatter {
15 /// A required short identifier (1-64 chars) containing only lowercase letters, numbers, and hyphens.
16 pub name: String,
17 /// A required concise description of what the skill does and when an agent should use it.
18 pub description: String,
19 /// License name or reference to a bundled license file.
20 pub license: Option<String>,
21 /// Max 500 characters. Indicates environment requirements (intended product, system packages, network access, etc.).
22 pub compatibility: Option<String>,
23 /// Arbitrary key-value mapping for additional metadata.
24 #[serde(default)]
25 pub metadata: std::collections::HashMap<String, serde_json::Value>,
26 /// Space-delimited list of pre-approved tools the skill may use. (Experimental)
27 #[serde(default, rename = "allowed-tools")]
28 pub allowed_tools: Vec<String>,
29}