pub struct SkillsRoot { /* private fields */ }Expand description
Root directory of Claude Code’s user-level skill definitions.
Defaults to ~/.claude/skills; override with SkillsRoot::at
for tests or non-default installs.
Implementations§
Source§impl SkillsRoot
impl SkillsRoot
Sourcepub fn home() -> Result<Self>
pub fn home() -> Result<Self>
Resolve the default ~/.claude/skills. Errors if $HOME
(or the platform-specific user home) cannot be determined.
Sourcepub fn at(path: impl Into<PathBuf>) -> Self
pub fn at(path: impl Into<PathBuf>) -> Self
Use a specific path as the skills root. Useful for tests (point at a tempdir) and for non-default installs.
Sourcepub fn list(&self) -> Result<Vec<SkillSummary>>
pub fn list(&self) -> Result<Vec<SkillSummary>>
List every skill directory at the root, sorted by directory stem.
A “skill” is any direct child directory of the root that
contains a SKILL.md. Directories without SKILL.md and
non-directory entries are ignored. Returns an empty vec if
the root itself doesn’t exist (a fresh Claude Code install
with no user skills). Directories whose SKILL.md fails to
parse contribute a tracing warning and are skipped rather
than failing the whole listing.
Trait Implementations§
Source§impl Clone for SkillsRoot
impl Clone for SkillsRoot
Source§fn clone(&self) -> SkillsRoot
fn clone(&self) -> SkillsRoot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more