pub struct SkillManager { /* private fields */ }Expand description
Manages loading and querying skills from the filesystem.
Implementations§
Source§impl SkillManager
impl SkillManager
Sourcepub fn load_from_dir(dir: &Path) -> Result<Self>
pub fn load_from_dir(dir: &Path) -> Result<Self>
Load all skills from the given directory.
Expected structure:
dir/
├── my-skill/
│ └── SKILL.md
└── another-skill/
└── SKILL.mdSourcepub fn get(&self, name: &str) -> Option<&Skill>
pub fn get(&self, name: &str) -> Option<&Skill>
Look up a skill by exact name (case-insensitive).
Sourcepub fn search(&self, query: &str) -> Vec<&Skill>
pub fn search(&self, query: &str) -> Vec<&Skill>
Search skills by query string.
Matches against name and description (case-insensitive). Returns skills sorted by relevance (name match first, then description match).
Sourcepub fn skills_dir() -> Result<PathBuf>
pub fn skills_dir() -> Result<PathBuf>
Get the default skills directory path (~/.oxi/skills/).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SkillManager
impl RefUnwindSafe for SkillManager
impl Send for SkillManager
impl Sync for SkillManager
impl Unpin for SkillManager
impl UnsafeUnpin for SkillManager
impl UnwindSafe for SkillManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more