Skip to content

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

Closed

Description

@holive

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

Activity

  1. github-actions commented on Dec 26, 2025

    @github-actions
    Contributor

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

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

  2. connorads commented on Dec 27, 2025

    @connorads
    Contributor

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

  3. holive commented on Dec 27, 2025

    @holive
    Author

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

    Thanks for the fix!

  4. ZainRizvi commented on Dec 29, 2025

    @ZainRizvi

    @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?
    
    ---
    
  5. connorads commented on Dec 29, 2025

    @connorads
    Contributor

    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 #6252 (comment)

    Image

    Another thing I didn't rectify was the directory walking, also mentioned in #6252 (comment) and the [existing docs]
    Image

  6. ZainRizvi commented on Dec 29, 2025

    @ZainRizvi

    Gotcha, thanks for the clarification. Just filed #6400 to track the feature request :)

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions