[BUG] Skills with disable-model-invocation: true only visible to LLM when slash command is at message start

Resolved 💬 2 comments Opened Jan 21, 2026 by Isoceth Closed Feb 27, 2026

Bug Description

When a skill has disable-model-invocation: true in its frontmatter, the LLM can only see the skill content (via <command-name> and <command-message> tags) if the slash command is placed at the start of the user's message. If the slash command appears anywhere else in the message, the LLM doesn't receive the skill context.

Environment

  • Platform: Linux
  • Claude Code version: Latest (2026-01-21)

Steps to Reproduce

  1. Create a skill with disable-model-invocation: true in frontmatter
  2. Test 1: Send message starting with the slash command:

``
/my-skill Do something
`
Result: ✅ LLM receives
<command-name> and <command-message>` tags and can see skill content

  1. Test 2: Send message with slash command elsewhere:

``
Do you see the skill I am about to invoke? /my-skill
``
Result: ❌ LLM does NOT receive the tags and cannot see skill content

Expected Behavior

The position of the slash command in the message should not affect whether the LLM receives the skill context. If disable-model-invocation: true is meant to prevent the LLM from autonomously invoking the skill (via the Skill tool), it should still receive the skill content when the user explicitly invokes it via slash command, regardless of message position.

Actual Behavior

Skill context is only loaded when the slash command is at the beginning of the message. This creates inconsistent behavior and makes it difficult to naturally reference or ask questions about skills mid-sentence.

Impact

  • Forces unnatural message formatting (slash command must be first)
  • Prevents asking questions about skills (e.g., "Can you see /my-skill?")
  • Creates confusion about when skills are actually loaded
  • Inconsistent with how user-invoked commands should work

Related Configuration

This specifically affects skills with:

---
disable-model-invocation: true
---

The disable-model-invocation flag is intended to prevent autonomous invocation by the LLM, not to make skill loading position-dependent for user invocations.

View original on GitHub ↗

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