health-plugin/skills/health-plugins/SKILL.md
Diagnose and fix Claude Code plugin registry corruption — orphaned entries, stale keys, scope conflicts. Use when seeing plugin-already-installed errors or registry drift.
npx skillsauth add laurigates/claude-plugins health-pluginsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
| Use this skill when... | Use another approach when... |
|------------------------|------------------------------|
| Fixing plugin registry corruption (issue #14202) | Comprehensive health check (use /health:check) |
| Diagnosing project-scope vs global plugin issues | Auditing plugins for relevance (use /health:audit) |
| Cleaning up orphaned plugin entries | Settings validation only needed |
| Resolving "plugin already installed" errors | Agentic optimization audit (use /health:agentic-audit) |
| Manually inspecting registry JSON | Just viewing installed plugins (read registry file) |
pwdfind . -maxdepth 2 -path '*/.claude-plugin/plugin.json' -type ffind . -maxdepth 1 -name '.claude/settings.json'find . -maxdepth 1 -type d -name '.claude-plugin'When a plugin is installed with --scope project in one project, other projects incorrectly show the plugin as "(installed)" in the Marketplaces view. This happens because:
~/.claude/plugins/installed_plugins.json stores projectPath for project-scoped installsImpact: Users cannot install the same plugin across multiple projects with project-scope isolation.
Parse these from $ARGUMENTS:
| Parameter | Description |
|-----------|-------------|
| --fix | Apply fixes to the plugin registry |
| --dry-run | Show what would be fixed without making changes |
| --plugin <name> | Check/fix a specific plugin only |
Execute this plugin registry diagnostic by running the scripts below. Pass --plugin <name> through from $ARGUMENTS when specified.
bash "${CLAUDE_SKILL_DIR}/scripts/check-registry.sh" --home-dir "$HOME" --project-dir "$(pwd)" [--plugin <name>] [--verbose]
Parse the STATUS=, PLUGIN_COUNT=, ORPHANED_ENTRIES=, and ISSUES: lines from output. The === PLUGINS === section lists each installed plugin with scope, version, source, and projectPath.
Print a structured diagnostic report summarising:
--verbose)Use the ISSUES: lines as the authoritative list of problems.
If $ARGUMENTS contains --fix:
Confirm with the user (via AskUserQuestion) which orphaned plugins to remove, unless --dry-run is also set.
Run the fix script:
bash "${CLAUDE_SKILL_DIR}/scripts/fix-registry.sh" --home-dir "$HOME" --project-dir "$(pwd)" [--plugin <name>] [--dry-run]
The script creates a timestamped backup at ~/.claude/plugins/installed_plugins.json.backup.<UTC-timestamp> before modifying the registry, validates the resulting JSON, and aborts safely on any error.
Parse STATUS=, REMOVED=, REMOVED_COUNT=, and BACKUP_PATH= lines to report what changed.
Surface durability warnings. If the output includes SETTINGS_CHEZMOI_MANAGED=true, relay the WARNING= line to the user: the edited ~/.claude/settings.json is chezmoi-managed, so the fix reverts on the next chezmoi apply unless the same key is also removed from the chezmoi source (printed as SETTINGS_CHEZMOI_SOURCE=).
When a plugin exists in the registry under a different projectPath and the user wants it available in the current project, use AskUserQuestion to confirm, then:
.claude/settings.json under enabledPlugins using the Edit tool./plugin install via the Claude Code UI for proper registry registration.After applying fixes, re-run Step 1 and confirm the issue count has dropped. Remind the user to restart Claude Code for changes to take effect.
{
"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:
"scope": "project" — has projectPath, only active in that project"scope": "user" — no projectPath, active globallyIf automatic fix fails, users can manually edit ~/.claude/plugins/installed_plugins.json:
projectPath to make it globalprojectPath to current project path| Context | Command |
|---------|---------|
| Plugin registry diagnostics | /health:plugins |
| Fix registry issues | /health:plugins --fix |
| Dry-run mode | /health:plugins --dry-run |
| Diagnose only (script) | bash "${CLAUDE_SKILL_DIR}/scripts/check-registry.sh" --home-dir "$HOME" --project-dir "$(pwd)" |
| Fix only (script) | bash "${CLAUDE_SKILL_DIR}/scripts/fix-registry.sh" --home-dir "$HOME" --project-dir "$(pwd)" |
| Flag | Description |
|------|-------------|
| --fix | Apply fixes (with confirmation prompts) |
| --dry-run | Show what would be fixed without changes |
| --plugin <name> | Target a specific plugin |
/health:check - Full diagnostic scan/health:settings - Settings file validationtesting
Verify accumulated bug claims at upstream HEAD and dedup against trackers before filing issues. Use when filing upstream reports from backlogs, audit docs, or git-history findings.
documentation
Gate outward-bound text (upstream issues, docs, PR bodies) through isolated haiku fresh-reader critique before publishing. Use when an artifact must survive a reader with zero project context.
tools
Suggest improvements to SKILL.md content, descriptions, or tool config from eval results. Use when raising pass rates, fixing triggering, or iterating on a skill after evaluation.
tools
deadbranch CLI for stale-branch cleanup — dry-run preview, TUI or non-interactive delete, protects main/develop/WIP. Use when asked to clean up branches, prune branches, or remove stale branches.