pub struct SkillDocument {Show 17 fields
pub id: String,
pub name: String,
pub description: String,
pub version: Option<String>,
pub license: Option<String>,
pub compatibility: Option<String>,
pub tags: Vec<String>,
pub allowed_tools: Vec<String>,
pub references: Vec<String>,
pub trigger: bool,
pub hint: Option<String>,
pub metadata: HashMap<String, Value>,
pub body: String,
pub path: PathBuf,
pub hash: String,
pub last_modified: Option<i64>,
pub triggers: Vec<String>,
}Expand description
A fully indexed skill document with a content-based unique ID.
Fields§
§id: StringA unique ID derived from the name and content hash.
name: StringThe canonical name of the skill.
description: StringDescription used for agent discovery.
version: Option<String>Semantic version.
license: Option<String>License tag.
compatibility: Option<String>Environment constraints.
List of discovery tags.
allowed_tools: Vec<String>Tools allowed for this skill.
references: Vec<String>External resources required by the skill.
trigger: boolIf true, requires explicit @name invocation.
hint: Option<String>Input guidance for users.
metadata: HashMap<String, Value>Custom extension metadata.
body: StringThe instructional Markdown body.
path: PathBufFile system path where the skill was loaded from.
hash: StringSHA256 hash of the content.
last_modified: Option<i64>Optional Unix timestamp of last file modification.
triggers: Vec<String>File glob patterns for activation triggers.
Implementations§
Source§impl SkillDocument
impl SkillDocument
Sourcepub fn engineer_instruction(
&self,
max_chars: usize,
active_tools: &[Arc<dyn Tool>],
) -> String
pub fn engineer_instruction( &self, max_chars: usize, active_tools: &[Arc<dyn Tool>], ) -> String
Engineers a full system instruction from the skill body, with truncation and optionally including tool capability hints.
Sourcepub fn engineer_prompt_block(&self, max_chars: usize) -> String
pub fn engineer_prompt_block(&self, max_chars: usize) -> String
Engineers a lightweight prompt block for Tier 1 injection.
Trait Implementations§
Source§impl Clone for SkillDocument
impl Clone for SkillDocument
Source§fn clone(&self) -> SkillDocument
fn clone(&self) -> SkillDocument
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more