-
Notifications
You must be signed in to change notification settings - Fork 2
fix(skills): build_registry() does not include managed_dir — bundled skills not matched when skills.paths is customized #2259
Copy link
Copy link
Closed
Labels
P2High value, medium complexityHigh value, medium complexitybugSomething isn't workingSomething isn't workingskillszeph-skills cratezeph-skills crate
Description
Summary
build_registry() provisions bundled skills to managed_dir (e.g., ~/.config/zeph/skills/) but then loads the registry only from self.config.skills.paths — never including managed_dir. As a result, bundled skills (browser, os-automation, etc.) are installed on disk but never enter the SkillRegistry and cannot be matched.
Root Cause
crates/zeph-core/src/bootstrap/mod.rs lines 355–357:
// build_registry() — BUG: does not include managed_dir
let skill_paths: Vec<PathBuf> =
self.config.skills.paths.iter().map(PathBuf::from).collect();
let registry = SkillRegistry::load(&skill_paths);Correct logic already exists in skill_paths() (lines 375–381) which adds managed_dir when not present, but build_registry() does not call it.
Impact
- Any user who overrides
skills.pathsin config (e.g., testing, custom skill dirs) loses all bundled skill matching silently - Default config is unaffected because
default_skills_dir()ISmanaged_dir— default users havemanaged_dirin theirskills.pathsby coincidence - Confirmed via live test:
skill matcher initialized for 1 skill(s)withpaths = [".local/testing/skills"]despite browser + os-automation provisioned to~/.config/zeph/skills/
Reproduction
- Set
skills.paths = ["/some/custom/path"]in config (any path other than the managed dir) - Start agent — bundled skills provision OK (no errors)
- Ask a query that should match a bundled skill (e.g., Playwright, browser automation)
- Observe:
skill matcher initialized for N skill(s)where N = skills in custom path only (bundled skills absent)
Fix
In build_registry(), use self.skill_paths() instead of self.config.skills.paths.iter():
let skill_paths = self.skill_paths(); // already adds managed_dir correctly
let registry = SkillRegistry::load(&skill_paths);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2High value, medium complexityHigh value, medium complexitybugSomething isn't workingSomething isn't workingskillszeph-skills cratezeph-skills crate