[DOCS] Skills substitutions table omits ${CLAUDE_PLUGIN_ROOT}, which plugins-reference says resolves in skill content
Documentation Type
Missing documentation (feature not documented)
Location
https://docs.claude.com/en/docs/claude-code/skills
Section / Topic
Available string substitutions
What's Wrong or Missing
The skills page's substitutions table lists $ARGUMENTS, $ARGUMENTS[N], $N, $name, ${CLAUDE_SESSION_ID}, ${CLAUDE_EFFORT}, ${CLAUDE_SKILL_DIR}, and ${CLAUDE_PROJECT_DIR}, then scopes them:
Claude Code substitutes${CLAUDE_SKILL_DIR}and${CLAUDE_PROJECT_DIR}in two places: the skill's markdown content, and Bash rules in theallowed-toolsfrontmatter.
CLAUDE_PLUGIN_ROOT appears zero times on that page. But the plugins reference documents it as resolving in skill content:
| Plugin component | Fields where placeholders resolve | | Skill and agent content | Anywhere the placeholder appears |
(https://docs.claude.com/en/docs/claude-code/plugins-reference, § Environment variables)
The two pages disagree on coverage. A plugin-skill author reading the skills page reasonably concludes ${CLAUDE_PLUGIN_ROOT} is unavailable in SKILL.md.
Two follow-on gaps:
- Neither page states whether
${CLAUDE_PLUGIN_ROOT}resolves in a skill'sallowed-toolsBash rules — the skills page names only${CLAUDE_SKILL_DIR}and${CLAUDE_PROJECT_DIR}there. - The escape paragraph covers
$before a digit,ARGUMENTS, or an argument name, and adds "A backslash before any other$is left unchanged." Readers must infer that no escape exists for${CLAUDE_*}tokens, so aSKILL.mdcannot print one literally.
Repro: open both pages and search each for CLAUDE_PLUGIN_ROOT.
Suggested Improvement
- Add
${CLAUDE_PLUGIN_ROOT}to the substitutions table — and${CLAUDE_PLUGIN_DATA}, documented in the same plugins-reference table — noting they apply to plugin skills only. - Extend the two-places sentence to state whether
${CLAUDE_PLUGIN_ROOT}resolves inallowed-tools. - Add one sentence: the
\$escape applies only to argument placeholders; there is no escape for the${CLAUDE_*}substitutions.
Impact
Medium - Makes feature difficult to understand
---
Related: #30578 and #53070 added ${CLAUDE_SKILL_DIR} and ${CLAUDE_EFFORT} to this same table. #81588 reports the opposite defect for ${CLAUDE_SKILL_DIR}.