pub struct SkillConfig {
pub name: String,
pub content: String,
pub version: String,
}Expand description
Configuration for a skill to be managed.
Fields§
§name: StringThe tool name (e.g., “agent-doc”, “webmaster”).
content: StringThe bundled SKILL.md content (typically from include_str!).
version: StringThe tool version (typically from env!("CARGO_PKG_VERSION")).
Implementations§
Source§impl SkillConfig
impl SkillConfig
Sourcepub fn new(
name: impl Into<String>,
content: impl Into<String>,
version: impl Into<String>,
) -> Self
pub fn new( name: impl Into<String>, content: impl Into<String>, version: impl Into<String>, ) -> Self
Create a new skill config.
Sourcepub fn skill_path(&self, root: Option<&Path>) -> PathBuf
pub fn skill_path(&self, root: Option<&Path>) -> PathBuf
Resolve the skill file path under the given root (or CWD if None).
Currently targets Claude Code layout: .claude/skills/<name>/SKILL.md
Sourcepub fn install(&self, root: Option<&Path>) -> Result<()>
pub fn install(&self, root: Option<&Path>) -> Result<()>
Install the bundled SKILL.md to the project.
When root is None, paths are relative to CWD.
Auto Trait Implementations§
impl Freeze for SkillConfig
impl RefUnwindSafe for SkillConfig
impl Send for SkillConfig
impl Sync for SkillConfig
impl Unpin for SkillConfig
impl UnsafeUnpin for SkillConfig
impl UnwindSafe for SkillConfig
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