{"version":"2.1.301","anchor":"plugin-agents-and-commands-get-a-plugin-data-directory","canonical_anchor":"plugin-agents-and-commands-get-a-plugin-data-directory","heading":"Plugin data folder now reaches agents, commands and skills, and can be missing","tier":"use","area":"Plugins","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.301\/e\/plugin-agents-and-commands-get-a-plugin-data-directory","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.301","markdown":"### Plugin data folder now reaches agents, commands and skills, and can be missing\n\nCLAUDE_PLUGIN_DATA now fills in plugin agent, command and skill prompts, and fails with an error when the plugin is on another machine\n\n**Unclear.** The variable name a plugin author writes to refer to the data folder is not stated.\n\n**What**\n\nA plugin is an add-on package for Claude Code, and each plugin can have its own data folder, referred to as `${CLAUDE_PLUGIN_DATA}`. How that is filled in changed:\n\n- Plugin agents, commands and skills now receive the data folder (`pluginDataDir`, passed as `dataDir`), so their prompts can refer to it.\n\n- If the folder cannot be found, filling in `${CLAUDE_PLUGIN_DATA}` now fails with `PluginDataDirUnknownError`, which says the plugin is on another machine and its data folder there did not come with it. Before, a path was always worked out.\n\n- A plugin command's `allowed-tools` (tools it may use without asking you) are now dropped when they name the plugin's data folder and that folder did not come with the plugin. The warning says so, replacing the earlier wording about entries being too long or naming a folder that holds a variable or a `$`.\n\n- The plugin sync output gained a `dataDirs` option.\n\n**Why**\n\nPlugin authors can use the data folder in agent, command and skill prompts. Where a plugin runs on another machine, hooks or commands that rely on it may now fail with a clear error, and a command may lose its pre-approved tools.\n\n- Area: Plugins\n- Tier: Use it now\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: yes"}