Skip to content

${CLAUDE_PLUGIN_ROOT} Paths

${CLAUDE_PLUGIN_ROOT} is a runtime variable that resolves to the absolute path of the plugin’s root directory at session start. Use it any time a skill, agent, rule, or hook needs to read a plugin-bundled asset.

Pilot users clone acn-claude-toolkit to arbitrary paths — ~/acn-claude-toolkit, ~/code/acn-claude-toolkit, /Volumes/work/.... Hardcoding ~/acn-claude-toolkit/... inside a skill’s markdown breaks for everyone whose clone lives elsewhere. ${CLAUDE_PLUGIN_ROOT} resolves correctly regardless of clone location.

Given a plugin loaded via --plugin-dir ~/acn-claude-toolkit/plugins/acn-slide-gen:

ReferenceResolves to
${CLAUDE_PLUGIN_ROOT}/Users/<user>/acn-claude-toolkit/plugins/acn-slide-gen
${CLAUDE_PLUGIN_ROOT}/assets/flavors/acn-standard/template.pptx/Users/<user>/acn-claude-toolkit/plugins/acn-slide-gen/assets/flavors/acn-standard/template.pptx
${CLAUDE_PLUGIN_ROOT}/scripts/decrypt_pptx.py/Users/<user>/acn-claude-toolkit/plugins/acn-slide-gen/scripts/decrypt_pptx.py

The variable is per-plugin. Each loaded plugin has its own ${CLAUDE_PLUGIN_ROOT} that points at that plugin’s directory, not the marketplace root.

  • Skill markdown — referencing template files, scripts, brand guides, or any other bundled asset
  • Agent prompts — pointing at templates the agent should fill
  • Rule files — rare, but if a rule needs to reference a bundled checklist, use this
  • User-facing onboarding docs — pilot users read those outside Claude. Use the literal path (~/acn-claude-toolkit/plugins/...) in install instructions, since ${CLAUDE_PLUGIN_ROOT} is only meaningful inside a Claude session.
  • CI scriptsbuildspec.yml and validators run outside Claude; they use repo-relative paths.
  • acn-slide-gen resolves all flavor templates, brand guides, and pipeline scripts via ${CLAUDE_PLUGIN_ROOT} — see plugins/acn-slide-gen/skills/generate/SKILL.md
  • acn-pursuit-toolkit resolves proposal templates via ${CLAUDE_PLUGIN_ROOT}/assets/templates/ — see the win-theme-builder skill