pub struct Skill { /* private fields */ }Expand description
A parsed, loadable skill unit.
Implementations§
Source§impl Skill
impl Skill
Sourcepub fn load(dir: impl Into<PathBuf>) -> Result<Self, SkillError>
pub fn load(dir: impl Into<PathBuf>) -> Result<Self, SkillError>
Load a skill bundle from a directory containing SKILL.md.
Sourcepub fn scan(root: impl AsRef<Path>) -> Result<Vec<Self>, SkillError>
pub fn scan(root: impl AsRef<Path>) -> Result<Vec<Self>, SkillError>
Scan a root directory for all skill bundle directories (each containing SKILL.md).
Sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Skill name (unique identifier).
Safe because Skill::load rejects a missing/empty name; Skill can therefore
never be constructed with None here.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
One-line description, safe for up-front listing.
Safe for the same invariant as Skill::name.
Sourcepub fn disclosure_view(&self) -> String
pub fn disclosure_view(&self) -> String
Progressive disclosure: name + description only. Low token cost, no body leakage.
This is what the agent should see in its system prompt before selecting a skill.
Trait Implementations§
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