[DOCS] Skills substitutions reference is missing `${CLAUDE_SKILL_DIR}`

Resolved 💬 2 comments Opened Mar 4, 2026 by coygeek Closed Mar 7, 2026

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://code.claude.com/docs/en/skills

Section/Topic

Available skill string substitutions in SKILL.md content.

Current Documentation

The substitutions table currently documents:

$ARGUMENTS, $ARGUMENTS[N], $N, ${CLAUDE_SESSION_ID}

There is no ${CLAUDE_SKILL_DIR} entry.

What's Wrong or Missing?

Changelog v2.1.64 adds ${CLAUDE_SKILL_DIR} for skills to reference their own directory in SKILL.md content. The skills docs currently omit this variable, so authors do not have a documented way to create path-stable references to bundled files/scripts.

Suggested Improvement

Add ${CLAUDE_SKILL_DIR} to the substitutions table with:

  1. Variable description and resolution behavior.
  2. Example usage in SKILL.md for script/file references.
  3. Notes on portability across project/user/plugin skills.

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

| Page | Line(s) | Context |
|------|---------|---------|
| https://code.claude.com/docs/en/skills | 202-212 | Substitutions table omits ${CLAUDE_SKILL_DIR} |
| https://code.claude.com/docs/en/slash-commands | 202-212 | Mirrored skills/substitutions content also omits ${CLAUDE_SKILL_DIR} |
| https://platform.claude.com/docs/en/agent-sdk/skills | n/a | Agent SDK cross-reference |

Total scope: 3 pages affected

Source: Changelog v2.1.64

  • Added ${CLAUDE_SKILL_DIR} variable for skills to reference their own directory in SKILL.md content.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗