Skip to content

feat: Support disable-model-invocation field in skill frontmatter #11972

Closed

Description

@rian-dolphin

Feature hasn't been suggested before.

  • 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:

  1. Create a skill with disable-model-invocation: true in the frontmatter
  2. Start a new OpenCode chat
  3. Ask the model what skills it has access to
  4. 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.

Activity

  1. github-actions commented on Feb 3, 2026

    @github-actions
    Contributor

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

    Feel free to ignore if this doesn't address your specific case.

  2. github-actions commented on Apr 5, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

  3. codey-byrne commented on Apr 9, 2026

    @codey-byrne

    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 ?

  4. AndriiBarabash commented on Apr 16, 2026

    @AndriiBarabash

    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",
        }
      }
    }
  5. yooo1999 commented on Jun 29, 2026

    @yooo1999

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions