[DOCS] Skills substitutions table omits ${CLAUDE_PLUGIN_ROOT}, which plugins-reference says resolves in skill content

Status Fixed / completed
Maintainer reply None cached
Activity 0 comments · opened Aug 11, 2026 · closed Aug 12, 2026

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 the allowed-tools frontmatter.

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:

  1. Neither page states whether ${CLAUDE_PLUGIN_ROOT} resolves in a skill's allowed-tools Bash rules — the skills page names only ${CLAUDE_SKILL_DIR} and ${CLAUDE_PROJECT_DIR} there.
  2. 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 a SKILL.md cannot print one literally.

Repro: open both pages and search each for CLAUDE_PLUGIN_ROOT.

Suggested Improvement

  1. 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.
  2. Extend the two-places sentence to state whether ${CLAUDE_PLUGIN_ROOT} resolves in allowed-tools.
  3. 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}.

View original on GitHub ↗