utils:find-claude-plugin-root
Installation
SKILL.md
Find Claude Plugin Root
This skill generates a Python resolver script at /tmp/cpr.py that locates a plugin's installation directory by reading ~/.claude/plugins/installed_plugins.json.
Problem It Solves
${CLAUDE_PLUGIN_ROOT} environment variable doesn't expand in markdown command files, making it impossible to reference plugin scripts and resources. This is a known issue: https://github.com/anthropics/claude-code/issues/9354
Solution
Generate a Python script that:
- Accepts plugin name as argument
- Tries
${CLAUDE_PLUGIN_ROOT}first (backwards compatible) - Reads installed_plugins.json and searches for exact match
- If no exact match, finds similar plugin names (fuzzy matching)
- Outputs the plugin installation path to stdout
- Saves to
/tmp/cpr.py(ephemeral, no project pollution)