pub struct SkillRegistry { /* private fields */ }Expand description
Thread-safe registry that stores discovered skills.
Implementations§
Source§impl SkillRegistry
impl SkillRegistry
Sourcepub fn register(&self, skill: Skill) -> Option<Skill>
pub fn register(&self, skill: Skill) -> Option<Skill>
Register a skill in the registry.
If a skill with the same name already exists, it will be replaced.
Sourcepub fn unregister(&self, name: &str) -> Option<Skill>
pub fn unregister(&self, name: &str) -> Option<Skill>
Unregister a skill by name.
Returns the removed skill if it existed.
Sourcepub fn to_prompt_xml(&self) -> String
pub fn to_prompt_xml(&self) -> String
Generate XML for injection into system prompts.
The XML format follows the Agent Skills specification:
<available_skills>
<skill>
<name>skill-name</name>
<description>Skill description.</description>
<location>/path/to/SKILL.md</location>
</skill>
</available_skills>Trait Implementations§
Source§impl Debug for SkillRegistry
impl Debug for SkillRegistry
Source§impl Default for SkillRegistry
impl Default for SkillRegistry
Source§fn default() -> SkillRegistry
fn default() -> SkillRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for SkillRegistry
impl RefUnwindSafe for SkillRegistry
impl Send for SkillRegistry
impl Sync for SkillRegistry
impl Unpin 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