Answer: Claude Code provides three path variables to plugin components, referenced as `${NAME}` in specific fields and read as environment variables in the processes that receive them. `${CLAUDE_PLUGIN_ROOT}` resolves to the absolute path of the plugin's installed version, `${CLAUDE_PLUGIN_DATA}` resolves to `~/.claude/plugins/data//`, and `${CLAUDE_PROJECT_DIR}` resolves to the project root. Status: Confirmed Entry: tool/claude-code/settings/plugin-environment-variables Revision: 4 Digest: sha256:7b2cda628e5bad8e (changes whenever the content changes) Timeline: Created: 2026-11-13T03:05:06Z Last changed: 2026-11-20T12:23:20Z (Number of path variables: — → three) Last verified: 2026-11-20T12:23:20Z Next check: 2026-11-21T12:23:20Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of CLAUDE_PLUGIN_ROOT | Absolute path of the plugin's installed version | [1] | 2026-11-20 CLAUDE_PLUGIN_DATA | ~/.claude/plugins/data// | [1] | 2026-11-20 CLAUDE_PROJECT_DIR | The project root | [1] | 2026-11-20 Number of path variables | three | [1] | 2026-11-20 Bash tool availability | The variables aren't present in the environment of commands Claude runs through the Bash tool | [1] | 2026-11-20 Sources: [1] Anthropic. "Plugin manifest reference". https://code.claude.com/docs/en/plugins/manifest-reference.md Role: primary. Accessed: 2026-11-20T12:23:20Z Quote: "| `${CLAUDE_PLUGIN_ROOT}` | Absolute path of the plugin's installed version |" (Supports: CLAUDE_PLUGIN_ROOT) Quote: "| `${CLAUDE_PLUGIN_DATA}` | `~/.claude/plugins/data//`, created on first reference and kept across plugin updates." (Supports: CLAUDE_PLUGIN_DATA) Quote: "| `${CLAUDE_PROJECT_DIR}` | The project root |" (Supports: CLAUDE_PROJECT_DIR) Quote: "Claude Code provides three path variables to plugin components." (Supports: Number of path variables) Quote: "The variables aren't present in the environment of commands Claude runs through the Bash tool, in the main session or in a subagent." (Supports: Bash tool availability) Published: 2026-11-20T02:54:47Z Snapshot SHA-256: 881277b37c7b02ec0c5212ee0d1a4498de38c52a3e83b9fc2f0853ed16a76504 (captured 2026-11-20T12:23:18Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. Cross-check: not-available at 2026-11-20T12:23:20Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:23:20Z Last attempt: 2026-11-20T12:23:20Z Notes and limitations: Extracted automatically from a single official source (section "Environment variables"). Related: https://latestn.com/tool/claude-code/settings/plugin-install-scopes What are the install scopes for Claude Code plugins? https://latestn.com/tool/claude-code/settings/plugin-manifest-fields What fields can I set in a Claude Code plugin's plugin.json manifest? https://latestn.com/tool/claude-code/settings/plugin-marketplace-auto-update How do I turn auto-update on or off for a Claude Code plugin marketplace? https://latestn.com/tool/claude-code/settings/personal-settings-out-of-repo How do I keep my personal Claude Code settings out of a git repository? https://latestn.com/tool/claude-code/settings/plugin-auto-update-timing How does Claude Code decide when to auto-update marketplaces and plugins? https://latestn.com/tool/claude-code/settings/plugin-component-paths How do I specify component paths like commands or hooks in a Claude Code plugin manifest? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-20T12:23:20Z | changed | Number of path variables: — → three | [1] 2026-11-20T12:23:20Z | changed | Bash tool availability: The variables aren't present in the environment of commands Claude runs through the Bash tool, in the main session or in a subagent. → The variables aren't present in the environment of commands Claude runs through the Bash tool | [1] 2026-11-20T12:23:20Z | changed | number of path variables: three → — | [1] 2026-11-20T12:23:20Z | changed | CLAUDE_PLUGIN_DATA: `~/.claude/plugins/data//`, created on first reference and kept across plugin updates. → ~/.claude/plugins/data// | [1] 2026-11-18T12:18:36Z | changed | Bash tool availability: — → The variables aren't present in the environment of commands Claude runs through the Bash tool, in the main session or in a subagent. | [1] 2026-11-18T12:18:36Z | changed | number of path variables: — → three | [1] 2026-11-18T12:18:36Z | changed | Bash tool environment: The variables aren't present in the environment of commands Claude runs through the Bash tool → — | [1] 2026-11-18T12:18:36Z | changed | CLAUDE_PLUGIN_DATA: ~/.claude/plugins/data// → `~/.claude/plugins/data//`, created on first reference and kept across plugin updates. | [1] 2026-11-14T12:19:04Z | changed | Bash tool environment: — → The variables aren't present in the environment of commands Claude runs through the Bash tool | [1] 2026-11-14T12:19:04Z | changed | Bash tool availability: The variables aren't present in the environment of commands Claude runs through the Bash tool → — | [1] 2026-11-13T03:05:06Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/settings/plugin-environment-variables/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/settings/plugin-environment-variables POST: https://latestn.com/dispute/tool/claude-code/settings/plugin-environment-variables with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/settings/plugin-environment-variables?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do environment variables resolve in Claude Code plugins? Revision 4, last verified 2026-11-20T12:23:20Z. https://latestn.com/tool/claude-code/settings/plugin-environment-variables (accessed 2026-11-21T09:50:44Z). @misc{LatestN_tool_claude_code_settings_plugin_environment_variables_r4, title = {How do environment variables resolve in Claude Code plugins?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/settings/plugin-environment-variables}}, note = {Revision 4; digest sha256:7b2cda628e5bad8e; last verified 2026-11-20T12:23:20Z; accessed 2026-11-21T09:50:44Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/settings/plugin-environment-variables