pub struct SkillDefinition {
pub id: SkillId,
pub name: String,
pub description: String,
pub license: Option<String>,
pub compatibility: Option<String>,
pub metadata: Option<Value>,
pub prompt: String,
pub tool_refs: Vec<String>,
}Expand description
Complete definition of a skill
Fields§
§id: SkillIdUnique identifier (kebab-case)
name: StringDisplay name
description: StringHuman-readable description
license: Option<String>Optional license information from SKILL.md frontmatter
compatibility: Option<String>Optional compatibility notes from SKILL.md frontmatter
metadata: Option<Value>Optional arbitrary metadata from SKILL.md frontmatter
prompt: StringPrompt fragment injected into system prompt
tool_refs: Vec<String>Built-in tool references (format: “tool”)
Implementations§
Source§impl SkillDefinition
impl SkillDefinition
Sourcepub fn new(
id: impl Into<String>,
name: impl Into<String>,
description: impl Into<String>,
prompt: impl Into<String>,
) -> Self
pub fn new( id: impl Into<String>, name: impl Into<String>, description: impl Into<String>, prompt: impl Into<String>, ) -> Self
Create a new skill definition.
Sourcepub fn with_tool_ref(self, tool_ref: impl Into<String>) -> Self
pub fn with_tool_ref(self, tool_ref: impl Into<String>) -> Self
Add a tool reference
Sourcepub fn is_builtin(&self) -> bool
pub fn is_builtin(&self) -> bool
Check if this is a built-in skill (based on id prefix).
Trait Implementations§
Source§impl Clone for SkillDefinition
impl Clone for SkillDefinition
Source§fn clone(&self) -> SkillDefinition
fn clone(&self) -> SkillDefinition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SkillDefinition
impl Debug for SkillDefinition
Source§impl<'de> Deserialize<'de> for SkillDefinition
impl<'de> Deserialize<'de> for SkillDefinition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SkillDefinition
impl RefUnwindSafe for SkillDefinition
impl Send for SkillDefinition
impl Sync for SkillDefinition
impl Unpin for SkillDefinition
impl UnsafeUnpin for SkillDefinition
impl UnwindSafe for SkillDefinition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more