opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Does opencode actually support finding skills at `.claude/skills`?

Open colobas opened this issue 2 months ago • 1 comments

Question

I was looking for where in the code the search in .claude/skills is being enabled, but the only reference I found to the claude directory is this commented out test which makes me think opencode isn't actually looking in .claude/skills folders?

What I'm actually interested is in being able to configure the directory where opencode looks. (e.g. making it .agent/skill rather than .opencode/skill), but that doesn't seem to be possible at the moment?

colobas avatar Dec 27 '25 22:12 colobas

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

  • #6177: Skill discovery doesn't match Claude Code's skills/ directory structure - directly addresses the .claude/skills question
  • #6171: Inconsistency in docs for where to install skills - covers the configuration/directory inconsistency
  • #6013: [FEATURE]: Add Skill Configuration to Config Type - related to configurable skill paths

Feel free to ignore if these don't address your specific case.

github-actions[bot] avatar Dec 27 '25 22:12 github-actions[bot]

This is partially addressed by PR #6539 which adds skills.path config for custom directories.

The PR adds custom paths alongside defaults (additive). If you need to disable/replace default paths entirely, that would be a separate feature request.

anntnzrb avatar Dec 31 '25 18:12 anntnzrb

It does read claude skills, for the project and global yep

rekram1-node avatar Dec 31 '25 18:12 rekram1-node

If u wanna add custom dirs, I recommend using: OPENCODE_CONFIG_DIR

rekram1-node avatar Dec 31 '25 18:12 rekram1-node

We could update it to support comma separated values or something but rn thats the cleanest solution I think, cc @anntnzrb

rekram1-node avatar Dec 31 '25 18:12 rekram1-node

We could update it to support comma separated values or something but rn thats the cleanest solution I think, cc @anntnzrb

#6539 - see usage examples

anntnzrb avatar Dec 31 '25 18:12 anntnzrb

Yeah I was saying instead of adding new configs fields we can just improve the already supported env var that handles this stuff already

rekram1-node avatar Dec 31 '25 18:12 rekram1-node

Hey @rekram1-node, following up on your suggestion to enhance OPENCODE_CONFIG_DIR with comma-separated values.

Here's what I'm proposing:

Usage

# Single path (backwards compatible)
export OPENCODE_CONFIG_DIR="~/my-config"

# Multiple paths with tilde expansion
export OPENCODE_CONFIG_DIR="~/my-config,/shared/team-config"

Expected Directory Structure

Each path should follow the standard .opencode/ structure:

OPENCODE_CONFIG_DIR="~/my-config,/shared/team-config"
                          │
              ┌───────────┴───────────┐
              ▼                       ▼
   ┌──────────────────┐    ┌──────────────────┐
   │  ~/my-config/    │    │ /shared/team-    │
   │  ├── agent/      │    │ config/          │
   │  ├── command/    │    │ ├── agent/       │
   │  ├── skill/      │    │ ├── command/     │
   │  └── plugin/     │    │ ├── skill/       │
   └──────────────────┘    │ └── plugin/      │
                           └──────────────────┘

Plural forms also work (agents/, commands/, skills/, plugins/).

Questions

  1. Does this match what you had in mind?
  2. Should the paths be loaded in order (left-to-right, later overrides earlier)?
  3. Any concerns with using comma as separator vs path.delimiter (: on Unix, ; on Windows)?

Let me know if this aligns with your vision before I proceed with the implementation.

anntnzrb avatar Dec 31 '25 19:12 anntnzrb

Yes that works

rekram1-node avatar Jan 18 '26 06:01 rekram1-node