health-plugins
Original:🇺🇸 English
Translated
Diagnose and fix plugin registry issues including orphaned entries and project-scope conflicts (addresses Claude Code issue
3installs
Added on
NPX Install
npx skill4agent add laurigates/claude-plugins health-pluginsTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →/health:plugins
Diagnose and fix issues with the Claude Code plugin registry. This command specifically addresses issue #14202 where project-scoped plugins incorrectly appear as globally installed.
When to Use This Skill
| Use this skill when... | Use another approach when... |
|---|---|
| Fixing plugin registry corruption (issue #14202) | Comprehensive health check (use |
| Diagnosing project-scope vs global plugin issues | Auditing plugins for relevance (use |
| Cleaning up orphaned plugin entries | Settings validation only needed |
| Resolving "plugin already installed" errors | Agentic optimization audit (use |
| Manually inspecting registry JSON | Just viewing installed plugins (read registry file) |
Context
- Current project: !
pwd - Plugin registry exists: !
find ~/.claude/plugins -maxdepth 1 -name 'installed_plugins.json' 2>/dev/null - Project settings exists: !
find . -maxdepth 1 -name '.claude/settings.json' 2>/dev/null - Project plugins dir: !
find . -maxdepth 1 -type d -name \'.claude-plugin\' 2>/dev/null
Background: Issue #14202
When a plugin is installed with in one project, other projects incorrectly show the plugin as "(installed)" in the Marketplaces view. This happens because:
--scope project- The plugin registry at stores
~/.claude/plugins/installed_plugins.jsonfor project-scoped installsprojectPath - The Marketplaces view only checks if a plugin key exists, not whether it's installed for the current project
- The install command refuses to install because it thinks the plugin already exists
Impact: Users cannot install the same plugin across multiple projects with project-scope isolation.
Parameters
| Parameter | Description |
|---|---|
| Apply fixes to the plugin registry |
| Show what would be fixed without making changes |
| Check/fix a specific plugin only |
Execution
Execute this plugin registry diagnostic:
Step 1: Read the plugin registry
- Read
~/.claude/plugins/installed_plugins.json - Parse each plugin entry to extract: plugin name and source, whether it has a (project-scoped), and the installation timestamp and version
projectPath
Step 2: Identify issues in the registry
Check for these issue types:
| Issue Type | Detection | Severity |
|---|---|---|
| Orphaned projectPath | | WARN |
| Missing from current project | Plugin has different | INFO |
| Duplicate scopes | Same plugin installed both globally and per-project | WARN |
| Invalid entry | Missing required fields or malformed data | ERROR |
Step 3: Report findings
Print a structured diagnostic report listing all installed plugins with scope and status, followed by issues found with severity, details, and suggested fixes.
Step 4: Apply fixes (if --fix flag)
For each issue, apply the appropriate fix:
- Orphaned projectPath -- remove the orphaned entry from installed_plugins.json
- Plugin needed in current project -- ask user which plugins to install, add new entry with current , update
projectPathwith.claude/settings.jsonif neededenabledPlugins
Before making changes:
- Create backup:
~/.claude/plugins/installed_plugins.json.backup - Validate JSON after modifications
- Report what was changed
Step 5: Verify the fix
After applying fixes:
- Re-read the registry
- Confirm issues are resolved
- Remind user to restart Claude Code for changes to take effect
Registry Structure Reference
json
{
"version": 2,
"plugins": {
"plugin-name@marketplace-name": [
{
"scope": "project",
"projectPath": "/path/to/project",
"installPath": "~/.claude/plugins/cache/marketplace/plugin-name/1.0.0",
"version": "1.0.0",
"installedAt": "2024-01-15T10:30:00Z",
"lastUpdated": "2024-01-15T10:30:00Z",
"gitCommitSha": "abc123"
}
]
}
}Scope types:
- — has
"scope": "project", only active in that projectprojectPath - — no
"scope": "user", active globallyprojectPath
Manual Workaround
If automatic fix fails, users can manually edit :
~/.claude/plugins/installed_plugins.json- Open the file in an editor
- Find the plugin entry
- Either:
- Remove to make it global
projectPath - Change to current project path
projectPath - Add a new entry with different key for current project
- Remove
- Save and restart Claude Code
Agentic Optimizations
| Context | Command |
|---|---|
| Plugin registry diagnostics | |
| Fix registry issues | |
| Dry-run mode | |
| Inspect registry | |
| Check specific plugin | |
| List orphaned paths | |
Flags
| Flag | Description |
|---|---|
| Apply fixes (with confirmation prompts) |
| Show what would be fixed without changes |
| Target a specific plugin |
See Also
- - Full diagnostic scan
/health:check - - Settings file validation
/health:settings - Issue #14202 - Upstream bug report