Skip to content

fix(skills): discover OpenCode skills in project and XDG paths - #121

Open
danew wants to merge 1 commit into
mainfrom
dane/fix-opencode-skill-discovery
Open

danew wants to merge 1 commit into
mainfrom
dane/fix-opencode-skill-discovery

Conversation

@danew

@danew danew commented Oct 23, 2026

Copy link
Copy Markdown

Summary

Fix the false installed_paths: 0 result for standard OpenCode workspace skills.

  • Detect .opencode/skills/<name>/SKILL.md in the active project and ancestor directories up to the nearest Git worktree root.
  • Recognize project .agents/skills and .claude/skills compatibility sources.
  • Use $XDG_CONFIG_HOME/opencode/skills (falling back to ~/.config/opencode/skills) for global OpenCode skills.
  • Recognize directory-based and flat Markdown skill files, including symlinked installs.
  • Stop treating opencode/agents/<name>.md agent definitions as installed skills.

The existing skills paths, skills list, skills doctor, and skill-open lookup share this detection. No installer, auth, dependency, or eval tooling changes are included. Arbitrary configured skill directories/catalogs are not parsed by this conventional-path diagnostic.

This is separate from device-auth PR #120.

Verification

  • Real-binary, offline integration tests cover paths/list/doctor, XDG overrides, project ancestors, Git-worktree boundaries, agent-definition exclusion, and symlinked skills.
  • cargo test --lib --test skills_discovery --test cli_blackbox: 371 library tests, 48 black-box tests and four new discovery tests passed; eight pre-existing ignored tests remain ignored.
  • cargo clippy --all-targets -- -D warnings -A clippy::cognitive_complexity passed.
  • Formatting and diff checks passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants