claude-code - 💡(How to fix) Fix [BUG] Skill tool blocks invocation with "disable-model-invocation" on skills that do NOT have that flag set [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#57906Fetched 2026-05-11 03:22:19
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×5commented ×1

Error Message

  1. Error fires immediately — skill never loads
  • #51165 — Skills with context: fork fail with "disable-model-invocation" (different trigger, same error message)

Fix Action

Workaround

Invoke the skill's content directly via an Agent tool with the skill's logic embedded in the prompt, bypassing the Skill tool.

Code Example

---
name: ce-compound-refresh
description: Refresh stale learning docs and pattern docs under docs/solutions/ by reviewing them against the current codebase...
---
RAW_BUFFERClick to expand / collapse

Environment

  • Claude Code: latest (Opus 4.7)
  • Platform: Linux (Debian 13)
  • Session type: interactive CLI
  • Plugin: compound-engineering-plugin v2.65.0

Bug

The Skill tool rejects invocation of compound-engineering:ce-compound-refresh with:

Skill compound-engineering:ce-compound-refresh cannot be used with Skill tool due to disable-model-invocation

But the skill's SKILL.md frontmatter does NOT set disable-model-invocation: true. It only has name and description:

---
name: ce-compound-refresh
description: Refresh stale learning docs and pattern docs under docs/solutions/ by reviewing them against the current codebase...
---

The skill IS listed in available skills (visible in system prompt) and CAN be triggered by the user typing /compound-engineering:ce-compound-refresh directly. Only the Skill tool invocation path is blocked.

Repro

  1. Install compound-engineering plugin (v2.65.0)
  2. In an active session, attempt: Skill(skill="compound-engineering:ce-compound-refresh")
  3. Error fires immediately — skill never loads

Other skills from the same plugin work fine via Skill tool (e.g. compound-engineering:ce-compound).

Key observations

  • The skill does NOT have disable-model-invocation: true in frontmatter
  • The skill does NOT have context: fork in frontmatter
  • The skill has a very long description field (~750 chars) that contains trigger phrases
  • The skill IS available and IS listed in the system prompt skills list
  • User-typed /compound-engineering:ce-compound-refresh presumably works (standard slash command path)

Hypothesis

The harness may be inferring disable-model-invocation behavior from the description content or length, rather than solely from the explicit frontmatter flag. The ce-compound-refresh description contains trigger phrases ("Trigger this skill when...", "Do not trigger for...") that might cause the harness to treat it as auto-trigger-only.

Workaround

Invoke the skill's content directly via an Agent tool with the skill's logic embedded in the prompt, bypassing the Skill tool.

Related issues

  • #43809 — Skills with explicit disable-model-invocation: true cannot be invoked by subagents
  • #51007 — Subagent skills: preload doesn't inject content when skill has disable-model-invocation: true
  • #51165 — Skills with context: fork fail with "disable-model-invocation" (different trigger, same error message)

This issue is distinct: the skill has NEITHER disable-model-invocation NOR context: fork, but is still blocked.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING