[BUG] $CLAUDE_PLUGIN_ROOT not substituted in user-invocable (slash command) skills
Resolved 💬 3 comments Opened Apr 6, 2026 by wfscot Closed Apr 9, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Plugin skills using disable-model-invocation: true (user-invocable/slash command skills) do not get ${CLAUDE_PLUGIN_ROOT} replaced with the actual cache path. Agent-invocable skills in the same plugin work correctly.
What Should Happen?
Both skill types should substitute ${CLAUDE_PLUGIN_ROOT} in the skill content with the cached plugin path.
Error Messages/Logs
Steps to Reproduce
- Install a plugin from a local directory marketplace (e.g. "source": "directory")
- Have two skills in the same plugin, both using ${CLAUDE_PLUGIN_ROOT} in their SKILL.md, one with disable-model-invocation: true, one without
- The agent-invocable skill resolves paths to ~/.claude/plugins/cache/... (correct)
- The user-invocable skill resolves paths to the source directory (incorrect), and its "Base directory" header also shows the source path
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.85
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Windows Terminal
Additional Information
This seems to be related to a number of reported issues re: CLAUDE_PLUGIN_ROOT:
#38699
#42564
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗