You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Add config option to restrict skill discovery directories #23035
OpenCode hardcodes skill discovery across 6 directories (3 global + 3 project-level):
~/.config/opencode/skills/
~/.claude/skills/
~/.agents/skills/
.opencode/skills/
.claude/skills/
.agents/skills/
There is no way to restrict which directories are scanned. Users who share skill files across tools (e.g., Claude Code + OpenCode) via hard links end up with identical skills in 3 global directories. OpenCode correctly deduplicates them, but scanning and deduplicating ~43 files across 3 directories adds ~5 seconds to startup time.
Reference from startup log:
WARN service=skill name=frontend-design existing=~/.claude/skills/... duplicate=~/.agents/skills/... duplicate skill name
WARN service=skill name=frontend-design existing=~/.agents/skills/... duplicate=~/.config/opencode/skills/... duplicate skill name
INFO service=skill count=15 init # 5+ seconds after first scan started
Proposed Solution
Add a skills.directories config option to opencode.json that lets users specify which directories to scan, replacing the hardcoded defaults:
Thanks for updating the issue! Everything looks good now — the feature request is clear, well-described, and follows the contributing guidelines. We appreciate you taking the time to improve it.
This issue is specifically about the performance impact of scanning multiple directories — 5+ seconds of startup time spent reading and deduplicating identical skills across ~/.claude/skills/, ~/.agents/skills/, and ~/.config/opencode/skills/.
Even a minimal fix — like respecting skills.paths as an override (replace defaults when set) rather than an additive list — would solve the startup regression without needing a new config key.
+1
Additionally to the added startup time, the <available_skills> system prompt bloats the context with irrelevant skills to the project. For example, if you have a few projects with different tech stacks, you don't want to load the irrelevant skill to the project, but the same skills would be relevant for another project with a different tech stack.
I purpose to inject only allowed skills or add the ability to override the skill directories per project.
Activity
github-actions commentedon Apr 17, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
[FEATURE]:as required by the feature request templatePlease edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
If you believe this was flagged incorrectly, please let a maintainer know.
[-]Add config option to restrict skill discovery directories[/-][+][FEATURE]: Add config option to restrict skill discovery directories[/+]github-actions commentedon Apr 17, 2026
Thanks for updating the issue! Everything looks good now — the feature request is clear, well-described, and follows the contributing guidelines. We appreciate you taking the time to improve it.
rahul-sensehq commentedon Apr 17, 2026
Related issues:
skills.search_pathsconfig but was closed without resolutionThis issue is specifically about the performance impact of scanning multiple directories — 5+ seconds of startup time spent reading and deduplicating identical skills across
~/.claude/skills/,~/.agents/skills/, and~/.config/opencode/skills/.Even a minimal fix — like respecting
skills.pathsas an override (replace defaults when set) rather than an additive list — would solve the startup regression without needing a new config key.PVLPM commentedon May 3, 2026
+1
Additionally to the added startup time, the <available_skills> system prompt bloats the context with irrelevant skills to the project. For example, if you have a few projects with different tech stacks, you don't want to load the irrelevant skill to the project, but the same skills would be relevant for another project with a different tech stack.
I purpose to inject only allowed skills or add the ability to override the skill directories per project.
github-actions commentedon Jul 4, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.