pub struct SkillRegistry { /* private fields */ }Expand description
Registry of all loaded skills with indexes for fast lookup.
Implementations§
Source§impl SkillRegistry
impl SkillRegistry
Sourcepub fn load(skills_dir: &Path) -> Result<Self, SkillError>
pub fn load(skills_dir: &Path) -> Result<Self, SkillError>
Load all skills from a directory. Each subdirectory is a skill.
If skill.toml exists, parse it for full metadata.
Otherwise, fall back to reading SKILL.md for name + description only.
Sourcepub fn list_skills(&self) -> &[SkillMeta]
pub fn list_skills(&self) -> &[SkillMeta]
List all loaded skills.
Sourcepub fn skills_for_tool(&self, tool_name: &str) -> Vec<&SkillMeta>
pub fn skills_for_tool(&self, tool_name: &str) -> Vec<&SkillMeta>
Skills that cover a specific tool name.
Sourcepub fn skills_for_provider(&self, provider_name: &str) -> Vec<&SkillMeta>
pub fn skills_for_provider(&self, provider_name: &str) -> Vec<&SkillMeta>
Skills that cover a specific provider name.
Sourcepub fn skills_for_category(&self, category: &str) -> Vec<&SkillMeta>
pub fn skills_for_category(&self, category: &str) -> Vec<&SkillMeta>
Skills that cover a specific category.
Sourcepub fn search(&self, query: &str) -> Vec<&SkillMeta>
pub fn search(&self, query: &str) -> Vec<&SkillMeta>
Search skills by fuzzy matching on name, description, keywords, hint, and tool names.
Sourcepub fn read_content(&self, name: &str) -> Result<String, SkillError>
pub fn read_content(&self, name: &str) -> Result<String, SkillError>
Read the SKILL.md content for a skill, stripping any YAML frontmatter.
Sourcepub fn list_references(&self, name: &str) -> Result<Vec<String>, SkillError>
pub fn list_references(&self, name: &str) -> Result<Vec<String>, SkillError>
List reference files for a skill.
Sourcepub fn read_reference(
&self,
skill_name: &str,
ref_name: &str,
) -> Result<String, SkillError>
pub fn read_reference( &self, skill_name: &str, ref_name: &str, ) -> Result<String, SkillError>
Read a specific reference file.
Sourcepub fn skill_count(&self) -> usize
pub fn skill_count(&self) -> usize
Number of loaded skills.
Sourcepub fn validate_tool_bindings(
&self,
name: &str,
manifest_registry: &ManifestRegistry,
) -> Result<(Vec<String>, Vec<String>), SkillError>
pub fn validate_tool_bindings( &self, name: &str, manifest_registry: &ManifestRegistry, ) -> Result<(Vec<String>, Vec<String>), SkillError>
Validate a skill’s tool bindings against a ManifestRegistry. Returns (valid_tools, unknown_tools).
Auto Trait Implementations§
impl Freeze for SkillRegistry
impl RefUnwindSafe for SkillRegistry
impl Send for SkillRegistry
impl Sync for SkillRegistry
impl Unpin for SkillRegistry
impl UnsafeUnpin for SkillRegistry
impl UnwindSafe for SkillRegistry
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