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-skillblocked 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

  1. Create a skill file at .claude/skills/my-skill/skill.md:
---
description: Example skill
disable-model-invocation: true
---

# My Skill

Run `echo "hello world"`.
  1. In a Claude Code session, type /my-skill
  2. 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

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗