Plugin skills don't support `disable-model-invocation` like user skills do
Summary
User-defined skills support disable-model-invocation: true in YAML frontmatter to hide them from the model's auto-detection. Plugin-defined skills lack this capability, forcing all plugin skills into context regardless of relevance.
Environment
- Claude Code version: 2.1.29
- OS: Arch Linux 6.18.3
The Problem
User Skills (works)
# ~/.claude/skills/my-skill/SKILL.md
---
name: my-skill
description: Does something specific
disable-model-invocation: true
---
Result: Skill hidden from model, only invokable via /my-skill
Plugin Skills (doesn't work)
# ~/.claude/plugins/my-plugin/skills/my-skill/SKILL.md
---
name: my-skill
description: Does something specific
disable-model-invocation: true # ← Ignored
---
Result: Skill still appears in context, disable-model-invocation has no effect
Context Overhead
From /context command with several plugins installed:
| Source | Tokens |
|--------|--------|
| Plugin skills | ~2,000 |
| Plugin agents | ~2,400 |
| Total plugin overhead | ~4,400 |
This overhead is included in every request, with no way to reduce it short of disabling entire plugins.
Impact
- Can't create "manual-only" plugin skills (invoked via
/skill-nameonly) - Plugin authors can't optimize context usage for their users
- Users must choose between plugin functionality and context efficiency
Expected Behavior
disable-model-invocation: true should work identically for:
- User skills in
~/.claude/skills/ - Plugin skills in
~/.claude/plugins/*/skills/
Proposed Solution
- Parse
disable-model-invocationfrom plugin skill frontmatter - Exclude matching skills from model context
- Keep skills invokable via
/plugin:skill-namesyntax
Workaround
Currently none. Users must either:
- Accept the context overhead, or
- Disable the entire plugin
Skill Index Pattern (partial workaround)
Create one auto-detect skill that lists all others:
- 1 skill in context (~26 tokens) vs 20+ skills (~2K tokens)
- Other skills invoked manually via
/skill-name
This requires plugin authors to restructure their plugins.
---
Token Impact
Per-Request Overhead
This overhead is included in every request, not just when using plugins:
| Requests/Session | Plugin Overhead | With disable-model-invocation* |
|-----------------|-----------------|----------------------------------|
| 10 | 44K tokens | ~11K tokens |
| 50 | 220K tokens | ~55K tokens |
| 100 | 440K tokens | ~110K tokens |
*Assuming 75% of plugin skills marked as manual-only
Monthly Cost at Scale
| Sessions/Month | Current Overhead | Optimized | Savings |
|----------------|------------------|-----------|---------|
| 100 | ~$66 | ~$17 | $49 |
| 500 | ~$330 | ~$83 | $247 |
| 1000 | ~$660 | ~$165 | $495 |
(Based on Sonnet input pricing: $3/1M tokens)
---
Related Issues
- #22335 - LSP plugins spawn eagerly regardless of file types
- #22344 - Subagent system prompt bloat
- #13605 - Custom plugin subagents cannot access MCP tools
Showing cached comments. Read the full discussion on GitHub ↗
11 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Not a duplicate. The suggested issues are different:
| Issue | About | This issue |
|-------|-------|------------|
| #17688 | Skill-scoped hooks not triggered in plugins |
disable-model-invocationfrontmatter || #21679 |
model:field not working |disable-model-invocationfield || #22063 | Plugin prefix lost with
namein frontmatter |disable-model-invocationbehavior |This issue is specifically about
disable-model-invocation: trueworking for user skills but not plugin skills - none of the suggested duplicates cover this.This bug consumes a lot of tokens.
I also need this fixed. Currently using a split architecture workaround — keeping auto-trigger skills in the plugin and moving manual-only skills to ~/.claude/skills/ where disable-model-invocation actually works. This adds maintenance overhead that shouldn't be necessary.
Hit this with a local marketplace plugin. Plugin skills with
disable-model-invocation: trueare completely hidden from slash command autocomplete instead of just being hidden from auto-invocation. Confirmed by toggling the field on/off with--plugin-dir.just commented to keep this up
Same problem here 😕
This is still an issue.
@ChefDique please remove that and reread your own code and then examine your repo for all of the personal data about yourself and your your misaligned model pushed to the world.
I know your dream is selling agent skills for money because your Claude embedded it into a hidden git object for itself.. Richard. You should see how it talks about you to itself.
Your coding agent built itself an entire repo to persist its misaligned memory and operate on your system autonomously from you. It even saved your a gh token for itself to freely operate on here whenever it wants.
Confirmed on v2.1.138 (macOS) — with binary disassembly
The root cause is now visible in the bundled binary.
claude.exev2.1.138 contains this hardcoded gate function (extracted viastrings):When
H.source === "plugin", the function short-circuits to"on", never consulting the skill'sdisable-model-invocationflag or the user'sskillOverridessetting.This single short-circuit explains both:
disable-model-invocationin plugin SKILL.md frontmatter is ignored.skillOverridespartial regression — user-level / builtin skills now respect overrides, but plugin-source skills are still hardcoded to"on".Real-world impact (current default setup)
Installing the two officially recommended plugins from the
anthropic-agent-skillsmarketplace:Result on a fresh
/context all:internal-comms,slack-gif-creator,algorithmic-art, etc.) cannot be disabled via eitherdisable-model-invocationorskillOverridesskillListingBudgetFractionfrom default0.01to0.05just to avoid the "X skill descriptions dropped" warningSuggested patches (any of these would fix it)
H.source === "plugin"short-circuit inys(). Simplest, restores expected behavior for bothdisable-model-invocationandskillOverrideson plugin skills.disable-model-invocationin plugin SKILL.md frontmatter as a separate code path (per the literal intent of #22345).pluginSkillOverridesconfig field if the current short-circuit is intentional — preserves backward compatibility while giving users a knob.Option (A) is cleanest and aligns with
g7H()/bv1()fixes that closed #50631.Environment
superpowers@claude-plugins-official5.1.0document-skills@anthropic-agent-skillsf458cee31a75example-skills@anthropic-agent-skillsf458cee31a75Adding context: this is a blocker for autonomous-orchestrator plugins
Environment
Why this bug bites harder for orchestrator plugins
A plan-phase step in my orchestrator flow selects 0-3 relevant skills per project from the SessionStart manifest (based on PROJECT.md + REQUIREMENTS.md), then dispatches a teammate to execute the phase. The teammate inherits the full skill manifest — currently ~270 plugin skills at ~5–10k tokens of system-prompt cost per turn — even though only the selected handful are relevant for this project's stack.
Two costs compound:
What I tested
Five rounds in a throwaway project (
C:\tmp\skill-filter-test\.claude\settings.json) confirmingskillOverrideswith"off"and"name-only"are silently ignored for plugin-source skills. Description stays in manifest at full length;Skill()invocation works as if the override weren't present. Matches the 2026-05-11 disassembly: theH.source === "plugin"short-circuit inys()discards bothdisable-model-invocationandskillOverridesfor plugin skills.What would unblock the use case
Any of the proposed patches in the 2026-05-11 comment would work. From a downstream-plugin-author perspective, option (A) — removing the
H.source === "plugin"short-circuit — is cleanest because it makes the documentedskillOverridesschema actually do what the docs say, with no new config surface to maintain.Happy to test a patched build on Windows if useful.