pub struct SkillTriggersHook { /* private fields */ }Expand description
On before_ingest, automatically activate relevant skills based on the user prompt.
When a match is found, insert a L1 hint (e.g. “Detected skill X relevance; use the
skill tool if needed”) before the prompt, rather than injecting the full skill body.
This follows progressive disclosure: the model decides whether to actually load the
skill.
Trigger conditions (any one triggers):
- keyword: any of the skill’s
triggers.keywordsis a case-insensitive substring of the prompt text. - glob: any “path-like token” extracted from the prompt text matches one of the
skill’s
triggers.globs.
Skills with always trigger are already injected in full at session start, so they
are skipped here to avoid duplicate hints.
Like SkillManifestHook, this hook holds a skill index and is registered via a
closure that captures the index (see defect_cli::hooks).
Implementations§
Trait Implementations§
Source§impl StepHandler for SkillTriggersHook
impl StepHandler for SkillTriggersHook
Auto Trait Implementations§
impl Freeze for SkillTriggersHook
impl RefUnwindSafe for SkillTriggersHook
impl Send for SkillTriggersHook
impl Sync for SkillTriggersHook
impl Unpin for SkillTriggersHook
impl UnsafeUnpin for SkillTriggersHook
impl UnwindSafe for SkillTriggersHook
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