pub struct SkillRegistry { /* private fields */ }Expand description
Registry of loaded skills, indexed by name.
Implementations§
Source§impl SkillRegistry
impl SkillRegistry
pub fn new() -> Self
Sourcepub fn reload(&mut self, working_dir: &Path) -> Vec<String>
pub fn reload(&mut self, working_dir: &Path) -> Vec<String>
Reload skills from all sources.
Load order (later entries overwrite earlier ones — higher priority wins):
Global (home dir or ATOMCODE_HOME):
{home}/.claude/commands/*.mdlegacy flat, Claude Code compat{home}/.atomcode/commands/*.mdlegacy flat, atomcode native{home}/.claude/skills/*/SKILL.mddirectory-style, Claude Code compat{home}/.atomcode/skills/*/SKILL.mddirectory-style, atomcode native
Project (working dir):
5. .claude/commands/*.md
6. .atomcode/commands/*.md
7. .claude/skills/*/SKILL.md
8. .atomcode/skills/*/SKILL.md
Same-name skill from a skills/ directory beats one from commands/
at the same level because it is loaded after.
Note: If ATOMCODE_HOME env var is set, it overrides the default home directory for atomcode-specific paths (.atomcode/commands and .atomcode/skills). Claude Code compat paths (.claude/*) always use the system home directory. Reload skills. Returns a list of “skipped” diagnostics (one per rejected skill on disk). Callers in interactive contexts (TUI) can surface these gated behind verbose mode; non-interactive callers (agent bootstrap, /cd) drop them.
Sourcepub fn register(&mut self, skill: Skill)
pub fn register(&mut self, skill: Skill)
Register a pre-built skill directly (used by plugin system).
Sourcepub fn get(&self, name: &str) -> Option<&Skill>
pub fn get(&self, name: &str) -> Option<&Skill>
Look up a skill by name. Falls back to a unique *:name suffix
match when the exact name misses AND the request is unqualified —
covers the case where a hook-injected workflow plan or other
external material refers to a plugin skill by its bare name
(ascend-model-verification) instead of the registered fully
qualified key (ascend-model-agent-plugin:ascend-model-verification).
Discipline: returns None when more than one namespace would match
the bare name. Silent-pick-the-first would mask real ambiguity (and
the LLM would invoke the wrong plugin) — better to error out so the
caller surfaces the candidates.
pub fn is_empty(&self) -> bool
Sourcepub fn user_invocable(&self) -> impl Iterator<Item = &Skill>
pub fn user_invocable(&self) -> impl Iterator<Item = &Skill>
Skills visible in the / menu (user-invocable).
Sourcepub fn invocable_by_llm(&self) -> impl Iterator<Item = &Skill>
pub fn invocable_by_llm(&self) -> impl Iterator<Item = &Skill>
Skills that Claude may invoke automatically.
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
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>
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>
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