[BUG] Skills/commands with disable-model-invocation: true appear in autocomplete but fail when invoked
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Summary
Skills and slash commands that have disable-model-invocation: true in their frontmatter appear in the autocomplete menu when users type /. However, when selected, they fail with an error stating the skill cannot be invoked due to disable-model-invocation. This creates a confusing UX where users are presented with non-functional options.
Environment
- Claude Code version: 2.1.23
- Platform: Linux
- OS: Linux 6.6.87.2-microsoft-standard-WSL2
The Problem
Example: /brainstorm command from superpowers plugin
The command file (commands/brainstorm.md) has:
---
description: "You MUST use this before any creative work..."
disable-model-invocation: true
---
When typing /, the autocomplete shows:
/brainstorm- Appears in menusuperpowers:brainstorming- Also appears as a skill
Attempting to invoke:
User types: /superpowers:brainstorm
Result:
Skill superpowers:brainstorm cannot be used with Skill tool due to disable-model-invocation
Impact
- User confusion: Why is this option presented if it doesn't work?
- Broken discovery flow: Users exploring available functionality hit errors
- Inconsistent with intent:
disable-model-invocationshould mean "model can't auto-invoke" not "users can't select from menu"
What Should Happen?
Option A: Items with disable-model-invocation: true should NOT appear in autocomplete
- Prevents confusion
- Only shows invokable options
Option B: If they do appear, they should work when selected
- The command invocation path should work regardless of the flag
- The flag should only prevent autonomous Skill tool invocation by the model
Proposed Solution
When building the autocomplete menu for /:
- Filter out items with
disable-model-invocation: trueat the command level, OR - Allow user selection of these items to work (respect the intent - user explicitly chose it)
The disable-model-invocation flag should prevent:
- Model from autonomously invoking via Skill tool
- Auto-detection/inclusion in context
But should NOT prevent:
- User from explicitly selecting from autocomplete menu
- User from typing the command directly
Error Messages/Logs
Steps to Reproduce
- Install a plugin with a command that has
disable-model-invocation: true
``bash``
/plugin marketplace add obra/superpowers-marketplace
/plugin install superpowers@superpowers-marketplace
- Type
/to open autocomplete menu - Observe that commands/skills with
disable-model-invocation: trueappear in the list - Select one of these items
- Observe error: "Skill X cannot be used with Skill tool due to disable-model-invocation"
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.23
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗