Repository navigation
Unable to recognize skills in the custom configuration folder #7896
Description
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
opencode/packages/opencode/src/skill/skill.ts
Line 106 in 68ed664
| for (const dir of await Config.directories()) { |
于是我拉取了源代码,并在
opencode/packages/opencode/src/skill/skill.ts
Line 106 in 68ed664
| 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
- open windows terminal, and run
$env:OPENCODE_CONFIG_DIR="E:/AI-projects/opencodecfg/ocfg"; opencode - when opencode starts, run
/or askwhat skills do you have?
Screenshot and/or share link
my custom config dir:
debug output:
slash / command did not list my skills:
AI's answer to what skills do you have?:
Operating System
Windows 11
Terminal
Windows Terminal
Activity
github-actions commentedon Jan 12, 2026
This issue might be a duplicate of existing issues. Please check:
.claude/skills? #6266: Does opencode actually support finding skills at.claude/skills? (Questions about configuring skill directories)Feel free to ignore if none of these address your specific case.
wiskewu commentedon Jan 12, 2026
other informations in case you may want to know about, my root config under
~/.config/opencode:wiskewu commentedon Jan 15, 2026
@rekram1-node Through code debugging, I discovered that the
oh-my-opencodeplugin was affectingOpenCode's skill lookup. I'm sorry, this isn't anOpenCodeissue; you can close this issue now. Thank you. I will resubmit this question in theoh-my-opencodeproject.我通过代码调试发现是 oh-my-opencode 这个插件影响了 opencode 本身对skills的查找。很抱歉,这个并不是 opencode 的问题,你们可以关闭这个 issue 了,谢谢。我将会到 oh-my-opencode 那个项目中重新提这个问题。
After disabling the plugin, everything worked as predicted.
在关闭插件之后,一切都正常了。