Skill discovery doesn't match Claude Code's skills/ directory structure #3871

Closed
opened 2026-02-16 17:41:46 -05:00 by yindo · 6 comments
Owner

Originally created by @holive on GitHub (Dec 25, 2025).

Originally assigned to: @thdxr on GitHub.

Problem

OpenCode documentation claims compatibility with Claude Code skills located in .claude/skills/, but the actual skill discovery doesn't find them.

Root Cause

The skill discovery uses the glob pattern skill/**/SKILL.md (singular), but Claude Code stores skills in skills/ (plural):

  • OpenCode expects: ~/.claude/skill/<name>/SKILL.md
  • Claude Code uses: ~/.claude/skills/<name>/SKILL.md

From packages/opencode/src/skill/skill.ts:

const SKILL_GLOB = new Bun.Glob("skill/**/SKILL.md")

Expected Behavior

Skills in ~/.claude/skills/ should be discovered automatically for Claude Code compatibility.

Suggested Fix

Either:

  1. Add skills/**/SKILL.md as an additional glob pattern
  2. Or update the glob to skill?(s)/**/SKILL.md if Bun's glob supports it

Workaround

Users can symlink their Claude skills:

mkdir -p ~/.config/opencode/skill
ln -s ~/.claude/skills/<skill-name> ~/.config/opencode/skill/<skill-name>

Environment

  • OpenCode version: 1.0.201
  • OS: macOS
Originally created by @holive on GitHub (Dec 25, 2025). Originally assigned to: @thdxr on GitHub. ## Problem OpenCode documentation claims compatibility with Claude Code skills located in `.claude/skills/`, but the actual skill discovery doesn't find them. ## Root Cause The skill discovery uses the glob pattern `skill/**/SKILL.md` (singular), but Claude Code stores skills in `skills/` (plural): - **OpenCode expects**: `~/.claude/skill/<name>/SKILL.md` - **Claude Code uses**: `~/.claude/skills/<name>/SKILL.md` From `packages/opencode/src/skill/skill.ts`: ```typescript const SKILL_GLOB = new Bun.Glob("skill/**/SKILL.md") ``` ## Expected Behavior Skills in `~/.claude/skills/` should be discovered automatically for Claude Code compatibility. ## Suggested Fix Either: 1. Add `skills/**/SKILL.md` as an additional glob pattern 2. Or update the glob to `skill?(s)/**/SKILL.md` if Bun's glob supports it ## Workaround Users can symlink their Claude skills: ```bash mkdir -p ~/.config/opencode/skill ln -s ~/.claude/skills/<skill-name> ~/.config/opencode/skill/<skill-name> ``` ## Environment - OpenCode version: 1.0.201 - OS: macOS
yindo closed this issue 2026-02-16 17:41:46 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 25, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #6171: Inconsistency in docs for where to install skills (documents similar path/directory confusion)
  • #6018: [BUG] Skill loading returns "[object Promise]" instead of actual skill list (related skill discovery issues)
  • #5991: Bug: SkillInvalidError during frontmatter parsing in SKILL.md (related to skill discovery and loading)
  • #3235: Support for "Skills" (initial feature request for skills support that led to current implementation)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Dec 25, 2025): This issue might be a duplicate of existing issues. Please check: - #6171: Inconsistency in docs for where to install skills (documents similar path/directory confusion) - #6018: [BUG] Skill loading returns "[object Promise]" instead of actual skill list (related skill discovery issues) - #5991: Bug: `SkillInvalidError` during frontmatter parsing in `SKILL.md` (related to skill discovery and loading) - #3235: Support for "Skills" (initial feature request for skills support that led to current implementation) Feel free to ignore if none of these address your specific case.
Author
Owner

@connorads commented on GitHub (Dec 27, 2025):

Hey @holive, I've opened #6252 for this

@connorads commented on GitHub (Dec 27, 2025): Hey @holive, I've opened #6252 for this
Author
Owner

@holive commented on GitHub (Dec 27, 2025):

Hey @holive, I've opened #6252 for this

Thanks for the fix!

@holive commented on GitHub (Dec 27, 2025): > Hey [@holive](https://github.com/holive), I've opened [#6252](https://github.com/sst/opencode/pull/6252) for this Thanks for the fix!
Author
Owner

@ZainRizvi commented on GitHub (Dec 29, 2025):

@connorads with the latest version with your fix included, I still don't seem to have global claude skills loading. Am I doing something wrong? I would have expected opencode to just read the skills by default.

This is on

opencode -v
1.0.208

Attempts to list skills:

 opencode debug skill
[]

And:


## User

what skills do you have access to?

---

## Assistant

I don't have access to any skills currently. The skill system shows:

\```
No skills are currently available.
\```

Skills would provide detailed instructions for specific tasks, but none are configured in this environment.

However, I have access to these core tools:
- **bash** - Run terminal commands
- **read/write/edit** - File operations
- **glob/grep** - File and content search
- **task** - Launch agents for complex tasks (general, explore)
- **webfetch** - Fetch web content
- **todowrite/todoread** - Task management

Is there something specific you'd like help with?

---
@ZainRizvi commented on GitHub (Dec 29, 2025): @connorads with the latest version with your fix included, I still don't seem to have global claude skills loading. Am I doing something wrong? I would have expected opencode to just read the skills by default. This is on ``` opencode -v 1.0.208 ``` Attempts to list skills: ``` opencode debug skill [] ``` And: ``` ## User what skills do you have access to? --- ## Assistant I don't have access to any skills currently. The skill system shows: \``` No skills are currently available. \``` Skills would provide detailed instructions for specific tasks, but none are configured in this environment. However, I have access to these core tools: - **bash** - Run terminal commands - **read/write/edit** - File operations - **glob/grep** - File and content search - **task** - Launch agents for complex tasks (general, explore) - **webfetch** - Fetch web content - **todowrite/todoread** - Task management Is there something specific you'd like help with? --- ```
Author
Owner

@connorads commented on GitHub (Dec 29, 2025):

Hey @ZainRizvi

You're not doing anything wrong, global Claude is not yet supported.
I tried to do the minimum work in #6252 to at least support project level Claude skills as per the existing docs
Image

I wasn't sure if global Claude skills had been discussed already in some other forum, given it wasn't in the initial release or docs, so I didn't consider adding it to my PR. But it seems as though @rekram1-node also thinks global Claude should be supported as per https://github.com/sst/opencode/pull/6252#issuecomment-3695408206

Image

Another thing I didn't rectify was the directory walking, also mentioned in https://github.com/sst/opencode/pull/6252#issuecomment-3695408206 and the [existing docs]
Image

@connorads commented on GitHub (Dec 29, 2025): Hey @ZainRizvi You're not doing anything wrong, global Claude is not yet supported. I tried to do the minimum work in #6252 to at least support project level Claude skills as per the [existing docs](http://opencode.ai/docs/skills) <img width="723" height="249" alt="Image" src="https://github.com/user-attachments/assets/60b4361b-a3dc-4188-8d52-3c31f984b1ae" /> I wasn't sure if global Claude skills had been discussed already in some other forum, given it wasn't in the initial release or docs, so I didn't consider adding it to my PR. But it seems as though @rekram1-node also thinks global Claude should be supported as per https://github.com/sst/opencode/pull/6252#issuecomment-3695408206 <img width="922" height="220" alt="Image" src="https://github.com/user-attachments/assets/a0ac4fef-624b-4322-a4f8-3a5174863a38" /> Another thing I didn't rectify was the directory walking, also mentioned in https://github.com/sst/opencode/pull/6252#issuecomment-3695408206 and the [existing docs] <img width="753" height="196" alt="Image" src="https://github.com/user-attachments/assets/d1ee84e8-8b00-4bbd-a18d-6beb3aa1f7c1" />
Author
Owner

@ZainRizvi commented on GitHub (Dec 29, 2025):

Gotcha, thanks for the clarification. Just filed https://github.com/sst/opencode/issues/6400 to track the feature request :)

@ZainRizvi commented on GitHub (Dec 29, 2025): Gotcha, thanks for the clarification. Just filed https://github.com/sst/opencode/issues/6400 to track the feature request :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3871