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
feat: Support disable-model-invocation field in skill frontmatter #11972
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Claude Code supports a disable-model-invocation: true frontmatter field in SKILL.md files that prevents skills from being loaded into the model's context while still allowing users to invoke them via slash commands.
Currently, OpenCode appears to ignore this field. Skills with disable-model-invocation: true are still visible to the model.
Steps to reproduce:
Create a skill with disable-model-invocation: true in the frontmatter
Start a new OpenCode chat
Ask the model what skills it has access to
Observe that the skill appears in the list, even though it shouldn't be visible to the model
Use case
When working with many skills (either project-specific or in a global user config), loading all skill names and descriptions into every chat consumes context unnecessarily. Some skills are better suited for direct user invocation rather than model discovery—for example, utility scripts or workflows that the user knows when to trigger.
Supporting disable-model-invocation would allow users to retain access to these skills via /skill-name while keeping the model's context cleaner.
Note on scope
I understand this is a Claude Code-specific feature, and OpenCode isn't aiming for full feature parity. If this falls outside the project's goals, that's completely understandable—just wanted to surface the use case in case it aligns with the direction you're heading.
Reacted by Seonu Jang, NightRare, Dominik Honnef, Michael Frick, MisileLab, Axel H., Michael Yochpaz, Kris Vandebroek, Sandy, Niklas Higi and 3 more
IMO, opencode should support this feature in one way or another. The current problem is that even with the configuration below, which denies the skill usage, the skill description is still loaded to the context window. So you can't invoke the skill in any way, but it's still present in the context, which makes no sense.
I’d like to add another real-world use case for this.
My global skills are shared between Claude Code and Cursor:
~/.claude/skills ->~/.cursor/skills
Several of these skills have:
disable-model-invocation: true
In Claude Code/Cursor this keeps them available for manual invocation, but prevents them from being exposed to the model automatically.
In OpenCode, they still appear to be discoverable by the model, which adds unnecessary context overhead. This becomes a serious issue when using many global skills together with MCP tools in long-running research/coding sessions.
Expected behavior:
Skills with disable-model-invocation: true should remain manually callable.
They should not appear in model-visible skill discovery.
Their names/descriptions should not be injected into context unless explicitly invoked.
This would make OpenCode much more practical for users who share skill directories across Claude Code, Cursor, and OpenCode.
Reacted by Bastien Limbour Pruvost and Brian Jubelirer
Activity
github-actions commentedon Feb 3, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if this doesn't address your specific case.
github-actions commentedon Apr 5, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.
codey-byrne commentedon Apr 9, 2026
Would also appreciate this being added to have parity with claude skills. Though is opencode going a different route by explicitly having to configure permissions as described in https://opencode.ai/docs/skills/#configure-permissions ?
AndriiBarabash commentedon Apr 16, 2026
IMO, opencode should support this feature in one way or another. The current problem is that even with the configuration below, which denies the skill usage, the skill description is still loaded to the context window. So you can't invoke the skill in any way, but it's still present in the context, which makes no sense.
{ "permission": { "skill": { "internal-*": "deny", } } }yooo1999 commentedon Jun 29, 2026
I’d like to add another real-world use case for this.
My global skills are shared between Claude Code and Cursor:
Several of these skills have:
In Claude Code/Cursor this keeps them available for manual invocation, but prevents them from being exposed to the model automatically.
In OpenCode, they still appear to be discoverable by the model, which adds unnecessary context overhead. This becomes a serious issue when using many global skills together with MCP tools in long-running research/coding sessions.
Expected behavior:
disable-model-invocation: trueshould remain manually callable.This would make OpenCode much more practical for users who share skill directories across Claude Code, Cursor, and OpenCode.