Promptles
Claude Code

CLAUDE_PLUGIN_ROOT

intermediate

Definition

A placeholder, written `${CLAUDE_PLUGIN_ROOT}`, that Claude Code swaps for the folder a plugin is installed in, so the plugin's file paths work on everyone's computer. That folder changes with each update, so anything the plugin needs to keep goes in `${CLAUDE_PLUGIN_DATA}` instead.

In the wild

A hook runs `${CLAUDE_PLUGIN_ROOT}/scripts/check.sh` instead of `/Users/dana/shipkit/scripts/check.sh`, a path that exists only on Dana's laptop.

More from Claude Code