Skip to content

Skill Discovery Only Checks skills/ Directory, Ignoring skill/ Path #8054

Closed

Description

@aforthwith

Description

Summary

The OpenCode skill discovery logic only searches in ~/.config/opencode/skills/ (plural) directories but ignores ~/.config/opencode/skill/ (singular), despite the documentation claiming both paths are valid discovery locations.

Impact

Users following the documented path (skill/ singular) will have their skills silently ignored with no error message, leading to confusion about why their skills aren't loading.

Root Cause

The glob pattern {skill,skills}/**/SKILL.md in Bun's Glob implementation was not correctly matching the skill/ (singular) directory path.

Fix Applied

Changed the glob pattern in packages/opencode/src/skill/skill.ts:39 from:

const OPENCODE_SKILL_GLOB = new Bun.Glob("{skill,skills}/**/SKILL.md")

To:

const OPENCODE_SKILL_GLOB = [new Bun.Glob("skill/**/SKILL.md"), new Bun.Glob("skills/**/SKILL.md")]

And updated the scanning loop to iterate over both glob patterns.

Files Changed

  • packages/opencode/src/skill/skill.ts

Test Case

mkdir -p ~/.config/opencode/skill/test-skill
cat > ~/.config/opencode/skill/test-skill/SKILL.md << 'EOF'
---
name: test-skill
description: A test skill
---
# Test Skill
This is a test.
EOF

opencode debug skill  # Should now show test-skill

Severity

Medium - Documentation/code inconsistency causing silent failures for users following official documentation.

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. aforthwith commented on Jan 12, 2026

    @aforthwith
    Author

    Alternatively, update the docs: https://opencode.ai/docs/skills/

    Says:

    Place files

    Create one folder per skill name and put a SKILL.md inside it. OpenCode searches these locations:

    Project config: .opencode/skill/<name>/SKILL.md
    Global config: ~/.config/opencode/skill/<name>/SKILL.md
    Project Claude-compatible: .claude/skills/<name>/SKILL.md
    Global Claude-compatible: ~/.claude/skills/<name>/SKILL.md
    
  2. github-actions commented on Jan 12, 2026

    @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.

  3. rekram1-node commented on Jan 12, 2026

    @rekram1-node
    Contributor

    i believe this is inaccurate, the skill/ dir definitely gets picked up from my testing, there may be a bug in the plural form tho

  4. rekram1-node commented on Jan 13, 2026

    @rekram1-node
    Contributor

    Confirmed that plurals and singulars are both picked up properly, maybe ur on out of date version

  5. sgamerw commented on Jan 17, 2026

    @sgamerw

    I'm confused about the loading directories for opencode skills. I see the same skills in ~/.config/opencode/skill, ~/.config/opencode/skills, and the project directory. When I ask opencode to update a specific skill, it only updates the skill under the project directory, which is confusing. I wish there was only one data source for clarity. Additionally, I discovered this issue after installing superpowers - the three directories all contain duplicate skills.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions