pub struct Skill {
pub name: String,
pub description: String,
pub trigger: Option<String>,
pub skill_type: SkillType,
pub priority: SkillPriority,
pub mandatory: bool,
pub dir: PathBuf,
pub body: String,
pub source_file: PathBuf,
}Expand description
A loaded skill ready to be advertised to the model.
Fields§
§name: StringCanonical identifier, taken from frontmatter name or file name.
Used as the argument to the skill tool.
description: StringShort one-line description shown in the system prompt.
trigger: Option<String>Trigger conditions (optional). When to use this skill. Example: “代码审查请求”、“用户说 ‘review’、“修改多个文件后”
skill_type: SkillTypeSkill type: Rigid (must follow exactly) or Flexible (adapt to context)
priority: SkillPrioritySkill priority: Process (first) or Implementation (second)
mandatory: boolWhether this skill is mandatory to invoke when triggered
dir: PathBufAbsolute path to the skill directory.
body: StringFull markdown body (without frontmatter).
source_file: PathBufThe source .md file path (SKILL.md or other .md file).
Implementations§
Trait Implementations§
impl StructuralPartialEq for Skill
Auto Trait Implementations§
impl Freeze for Skill
impl RefUnwindSafe for Skill
impl Send for Skill
impl Sync for Skill
impl Unpin for Skill
impl UnsafeUnpin for Skill
impl UnwindSafe for Skill
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