Skip to content

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

@holive

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

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