Skill Discovery Only Checks `skills/` Directory, Ignoring `skill/` Path
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