${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.
Why it exists
Section titled “Why it exists”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.
How it resolves
Section titled “How it resolves”Given a plugin loaded via --plugin-dir ~/acn-claude-toolkit/plugins/acn-slide-gen:
| Reference | Resolves 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.
Where to use it
Section titled “Where to use it”- 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
Where NOT to use it
Section titled “Where NOT to use it”- 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 scripts —
buildspec.ymland validators run outside Claude; they use repo-relative paths.
Concrete examples in this toolkit
Section titled “Concrete examples in this toolkit”acn-slide-genresolves all flavor templates, brand guides, and pipeline scripts via${CLAUDE_PLUGIN_ROOT}— seeplugins/acn-slide-gen/skills/generate/SKILL.mdacn-pursuit-toolkitresolves proposal templates via${CLAUDE_PLUGIN_ROOT}/assets/templates/— see thewin-theme-builderskill