disable-model-invocation blocks user-typed slash commands

Status Fixed / completed
Maintainer reply None cached
Activity 6 comments · opened Apr 4, 2026 · closed Apr 11, 2026

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

  1. Create a skill file .claude/skills/commit/SKILL.md with frontmatter:

``yaml
---
name: commit
description: Safe commit workflow
disable-model-invocation: true
---
``

  1. The skill appears in the registered skills list
  2. User types /commit in the prompt
  3. The model attempts to use the Skill tool (since that's how slash commands are processed)
  4. 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.

View original on GitHub ↗

6 Comments

zeveck · 4 months ago

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.

github-actions[bot] · 4 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/38969
  2. https://github.com/anthropics/claude-code/issues/26473

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

cowwoc · 4 months ago

Reproducible in version 2.1.92. Version 2.1.91 works fine.

cowwoc · 4 months ago

I can not reproduce this issue in 2.1.94. @zeveck if you're seeing the same, consider closing this as fixed.

zeveck · 4 months ago

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.

github-actions[bot] · 4 months ago

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.