disable-model-invocation blocks user-typed slash commands
Bug
Skills with disable-model-invocation: true in their YAML frontmatter cannot be invoked even when the user types the slash command directly. The Skill tool returns:
Error: Skill commit cannot be used with Skill tool due to disable-model-invocation
Expected behavior
disable-model-invocation: true should only prevent the model from invoking the skill autonomously. When a user explicitly types /commit (or any registered skill), it should always work — the user's intent is clear.
Steps to reproduce
- Create a skill file
.claude/skills/commit/SKILL.mdwith frontmatter:
``yaml``
---
name: commit
description: Safe commit workflow
disable-model-invocation: true
---
- The skill appears in the registered skills list
- User types
/commitin the prompt - The model attempts to use the Skill tool (since that's how slash commands are processed)
- The Skill tool rejects it because
disable-model-invocation: true
Root cause
It appears that user-typed slash commands and model-initiated skill invocations both flow through the same Skill tool path, so the disable-model-invocation flag blocks both. These should be distinguished — user-typed slash commands should bypass the flag.
Workaround
Remove disable-model-invocation: true from the skill frontmatter, which allows the skill to work but also allows the model to invoke it autonomously.
6 Comments
Most commands are actually working fine, and this even worked on re-attempt, but the catch was weird.
❯ /commit
● Skill(commit)
⎿ Initializing…
⎿ Error: Skill commit cannot be used with Skill tool due to disable-model-invocation
Of course, Claude then did it manually anyways. :) Also, Claude wrote the above, but it felt it over-generalized from one instance.
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Reproducible in version 2.1.92. Version 2.1.91 works fine.
I can not reproduce this issue in 2.1.94. @zeveck if you're seeing the same, consider closing this as fixed.
My ability to reproduce it was sporadic in the first place, so if you say it's fixed, I'll go with that and close.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.