disable-model-invocation blocks user-initiated slash commands
Resolved 💬 4 comments Opened Mar 25, 2026 by bennadel Closed Mar 29, 2026
Bug Description
The disable-model-invocation: true frontmatter in a skill's skill.md blocks all invocations of the skill, including when the user explicitly types the slash command (e.g., /my-skill). According to the documentation, this flag should only prevent Claude from autonomously deciding to invoke the skill — user-initiated slash commands should still work.
Expected Behavior
- User types
/my-skill→ skill executes normally - Claude decides on its own to call the skill → blocked by
disable-model-invocation
Actual Behavior
- User types
/my-skill→ blocked with error:Skill my-skill cannot be used with Skill tool due to disable-model-invocation - Claude decides on its own to call the skill → blocked (correct)
Both paths are blocked, making the flag unusable for its intended purpose (skills with side effects where the user controls timing).
Steps to Reproduce
- Create a skill file at
.claude/skills/my-skill/skill.md:
---
description: Example skill
disable-model-invocation: true
---
# My Skill
Run `echo "hello world"`.
- In a Claude Code session, type
/my-skill - Observe the error:
Skill my-skill cannot be used with Skill tool due to disable-model-invocation
Screenshot
The user types /benn-branch directly in the prompt, and the Skill tool is called but immediately errors:
> /benn-branch
● I'll run the /benn-branch skill to create a new feature branch and set up your environment.
● Skill(benn-branch)
⎿ Initializing…
⎿ Error: Skill benn-branch cannot be used with Skill tool due to disable-model-invocation
Skill File
---
description: Check out a fresh feature branch from main with clean migrations
disable-model-invocation: true
model: claude-haiku-4-5-20251001
---
# New Feature Branch
...
Environment
- Claude Code version: 2.1.83
- OS: macOS 26.3.1 (Darwin 25.3.0)
- Node: v25.3.0
- Shell: zsh
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗