pub struct SkillSpec {
pub name: String,
pub dir: PathBuf,
pub description: String,
pub body: String,
pub always: bool,
pub triggers: SkillTriggers,
}Expand description
A parsed skill.
Produced by discover_skills; consumed by the skill tool — name / description
go into the tool schema’s manifest, body is returned as the tool result when the
model fetches by name, and dir gives the model the absolute root for resource files
(scripts/ / refs/). always / triggers drive automatic activation (see
SkillTriggers), and are projected into the agent-side SkillEntry during CLI
assembly.
Fields§
§name: StringSkill name (directory name). Value of the name enum in the skill tool.
dir: PathBufAbsolute path to the skill directory, used by the skill tool to backfill
resource file paths for the model.
description: StringSelection-phase description – included in the L1 manifest so the model can decide whether to load it. Required.
body: StringThe full body of SKILL.md after stripping the frontmatter (content loaded at
L2).
always: boolalways: true ⇒ body is injected directly into the system prompt at session start
(always-on).
triggers: SkillTriggersAuto-activation trigger conditions (globs are compiled into GlobSet/keywords
during parsing). Reuses the agent-side type; CLI projection clones directly.