Skip to content

Unable to recognize skills in the custom configuration folder #7896

Closed

Description

@wiskewu

Description

Unable to recognize skills in the custom configuration folder
无法识别自定义配置文件夹下的skills

I set the environment variable OPENCODE_CONFIG_DIR according to the documentation and launched OpenCode, but the slash command cannot recognize the skills in this directory.
我根据文档设置环境变量OPENCODE_CONFIG_DIR,并启动opencode,但通过斜杠命令无法识别这个目录下的skills

So I pulled the source code and added two lines of debugging code at

for (const dir of await Config.directories()) {
.
于是我拉取了源代码,并在
for (const dir of await Config.directories()) {
处增加了两行调试代码:

 // Scan .opencode/skill/ directories
    console.log('Config.directories:', await Config.directories())
    for (const dir of await Config.directories()) {
      console.log('Scanning for skills in directory:', dir);
      for await (const match of OPENCODE_SKILL_GLOB.scan({
        cwd: dir,
        absolute: true,
        onlyFiles: true,
        followSymlinks: true,
      })) {
        await addSkill(match)
      }
    }

Then run bun dev debug skill, and below is its output.
然后运行bun dev debug skill,下面是他的输出:

Scanning for skills in directory: C:\Users\DELL\.config\opencode
Scanning for skills in directory: E:\ghcodes\opencode\.opencode
Scanning for skills in directory: E:/AI-projects/opencodecfg/ocfg
[
  {
    "name": "test-skill",
    "description": "use this when asked to test skill",
    "location": "E:\\ghcodes\\opencode\\.opencode\\skill\\test-skill\\SKILL.md"
  },
  {
    "name": "ui-ux-pro-max",
    "description": "UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.",
    "location": "E:\\AI-projects\\opencodecfg\\ocfg\\skill\\ui-ux-pro-max\\SKILL.md"
  },
  {
    "name": "smart-docs",
    "description": "AI-powered comprehensive codebase documentation generator. Analyzes project structure, identifies architecture patterns, creates C4 model diagrams, and generates professional technical documentation. Use when users need to document codebases, understand software architecture, create technical specs, or generate developer guides. Supports all programming languages. Alternative to Litho/deepwiki-rs that uses Claude Code subscription without external API costs.",
    "location": "E:\\AI-projects\\opencodecfg\\ocfg\\skill\\smart-docs\\SKILL.md"
  },
  // ...other skills, too long to display.
]

As you can see, the code can read the skills in the custom configuration directory, but it cannot read these skills by using OpenCode's forward slash or by asking the AI.
可以看到代码是可以读取到自定义配置目录下的skills的,但通过opencode的斜杠或者询问AI,却无法读取到这些skills。

Plugins

oh-my-opencode

OpenCode version

1.1.8

Steps to reproduce

  1. open windows terminal, and run $env:OPENCODE_CONFIG_DIR="E:/AI-projects/opencodecfg/ocfg"; opencode
  2. when opencode starts, run / or askwhat skills do you have?

Screenshot and/or share link

my custom config dir:

Image

debug output:

Image

slash / command did not list my skills:

Image

AI's answer to what skills do you have?:

Image

Operating System

Windows 11

Terminal

Windows Terminal

Activity

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

  2. wiskewu commented on Jan 12, 2026

    @wiskewu
    Author

    other informations in case you may want to know about, my root config under ~/.config/opencode:

    Image
  3. wiskewu commented on Jan 15, 2026

    @wiskewu
    Author

    @rekram1-node Through code debugging, I discovered that the oh-my-opencode plugin was affecting OpenCode's skill lookup. I'm sorry, this isn't an OpenCode issue; you can close this issue now. Thank you. I will resubmit this question in the oh-my-opencode project.
    我通过代码调试发现是 oh-my-opencode 这个插件影响了 opencode 本身对skills的查找。很抱歉,这个并不是 opencode 的问题,你们可以关闭这个 issue 了,谢谢。我将会到 oh-my-opencode 那个项目中重新提这个问题。

    After disabling the plugin, everything worked as predicted.
    在关闭插件之后,一切都正常了。

    Image Image
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 workingwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions