pub struct SkillFrontmatter {
pub name: String,
pub description: String,
pub applies_to: Option<HashMap<String, String>>,
pub references_tools: Vec<String>,
pub references_arguments: Vec<String>,
pub references_properties: Vec<String>,
pub auto_inject_hint: bool,
pub applies_when: Option<AppliesWhen>,
}Expand description
Parsed YAML frontmatter of a SKILL.md file.
Phase 1b stores all declared fields as raw values. Phase 1f / 2a
will add validation (applies_to semver checks, references_tools
against the active tool catalogue, references_arguments against
each tool’s input schema). For now: parse and preserve; the lint
step in Registry::finalise() walks these and surfaces issues as
log warnings.
Fields§
§name: StringSkill name. Must match the lookup key used in prompts/get.
Required; empty after deserialization triggers a clear
SkillError::MissingRequiredField rather than a generic
YAML parse failure.
description: StringOne-line description shown in prompts/list. Required —
the agent uses this to decide whether to load the full body.
applies_to: Option<HashMap<String, String>>Version constraints. Parsed lazily — Phase 1b stores raw values, Phase 1f adds semver validation.
references_tools: Vec<String>Tools this skill teaches or references in prose. Used for auto-inject discoverability hints (Phase 1c) and staleness detection (Phase 1f).
references_arguments: Vec<String>Specific tool argument names referenced in the skill body
(e.g. "cypher_query.format"). Lint warns when references
don’t match the tool’s actual input schema.
references_properties: Vec<String>Graph properties / domain-specific references the skill calls
out (e.g. "Function.module"). For domain skill-packs to
declare their domain assumptions. The framework can’t validate
these statically; they’re documentation-grade metadata.
auto_inject_hint: boolWhen true (the default) AND the skill’s name matches a
registered MCP tool, the framework injects a “see prompts/get
<name> for full methodology” pointer into the tool’s
description. Phase 1c wires this up.
applies_when: Option<AppliesWhen>applies_when: predicate set. Bounded — not a DSL. All
populated fields must evaluate true (AND semantics) for the
skill to surface in prompts/list and prompts/get. The
framework dispatches tool_registered and extension_enabled
itself; domain predicates (graph_has_node_type,
graph_has_property) are evaluated via the optional
SkillPredicateEvaluator registered on the
Registry.
None (the default) means “always active” — the skill applies
regardless of runtime state.
Trait Implementations§
Source§impl Clone for SkillFrontmatter
impl Clone for SkillFrontmatter
Source§fn clone(&self) -> SkillFrontmatter
fn clone(&self) -> SkillFrontmatter
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more