--plugin-dir does not override marketplace plugin with same name
Resolved 💬 3 comments Opened Mar 28, 2026 by benkruger Closed Mar 31, 2026
Root Cause Confirmed
The userConfig block in plugin.json with "sensitive": true causes Claude Code to force-load the marketplace-installed plugin instead of honoring --plugin-dir.
Reproduction
- Install a plugin from the marketplace that has
userConfigwith"sensitive": truein itsplugin.json - Clone the same plugin's source locally
- Run
claude --plugin-dir /path/to/local/clone - Skills resolve
${CLAUDE_PLUGIN_ROOT}to the marketplace path, not the--plugin-dirpath
Fix that confirms
Removing the userConfig block from the local plugin's plugin.json restores --plugin-dir override behavior. Skills then correctly resolve ${CLAUDE_PLUGIN_ROOT} to the local path.
Expected Behavior
--plugin-dir should override the marketplace plugin regardless of userConfig presence. Secret bindings from the marketplace installation should be available to the --plugin-dir version when the plugin name matches.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗