Plugin skill variable substitution: ${CLAUDE_SKILL_DIR} not expanded in skill instructions
Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 0 comments · opened Jul 27, 2026
Environment
- OS: macOS (Darwin 25.5.0)
- Claude Code version: 2.1.220
Reproducer
- Invoke a plugin-provided skill using the namespace syntax:
/plugin-name:skill-name [args] - The skill's instructions/reference docs contain a reference to
${CLAUDE_SKILL_DIR}(e.g., "Reference material is found in${CLAUDE_SKILL_DIR}") - Observe the rendered instructions delivered to Claude
Expected behavior
The literal string ${CLAUDE_SKILL_DIR} should be substituted with the actual filesystem path to the plugin skill's directory.
Actual behavior
The variable ${CLAUDE_SKILL_DIR} appears unresolved in the skill instructions sent to Claude — it remains as the literal string ${CLAUDE_SKILL_DIR}, causing the skill to abort when it cannot locate its reference files per its own safety guards.
Impact
Plugin-provided skills that reference their own bundled files or supporting documentation using ${CLAUDE_SKILL_DIR} cannot function — they fail with "path not provided by the harness, stopping per instructions."
Additional notes
- The variable is documented at https://code.claude.com/docs/en/skills.md as supported in skill markdown content and
allowed-toolsfrontmatter - The bug is reproducible and repeatable with the same skill and invocation syntax