Health audit

From laurigates/claude-plugins · View interactive version

Health audit is an AI agent skill from the GitHub repository laurigates/claude-plugins. Plugin audit against detected stack (Python, Node, Rust, Go, Terraform, Docker, K8s). Use when cleaning up unused plugins or discovering stack-relevant ones for a project.

How to use this skill

Skill file

health-audit

The user-facing entry point is /health:check --scope=stack, with --fix to apply changes; this skill is model-invoked only (user-invocable: false).

Audit the project's enabled plugins against the actual technology stack. Identifies plugins that don't apply to this project and suggests relevant plugins that aren't enabled.

When to Use This Skill

| Use this skill when... | Use another approach when... |

|------------------------|------------------------------|

| Reviewing plugin relevance for current project | General health diagnostics (use /health:check) |

| Cleaning up unused plugins | Plugin registry corruption (/health:check --scope=registry --fix) |

| Discovering relevant plugins for tech stack | Bare CLI commands in skill docs (/health:check --scope=agentic) |

| Optimizing project-specific plugin configuration | Installing specific plugin (install directly) |

| Onboarding to existing project | Need comprehensive settings validation |

Context

Parameters

| Parameter | Description |

|-----------|-------------|

| --fix | Apply recommended changes to .claude/settings.json |

| --dry-run | Show what would be changed without modifying files |

| --verbose | Show detailed analysis of each plugin decision |

Execution

Execute this plugin relevance audit:

Step 1: Detect the project technology stack

Analyze project files from the values in Context to determine the technology stack. Match indicators against the tech stack mapping in REFERENCE.md.

Step 2: Retrieve installed and available plugins

Run claude plugin list --json --available. It prints one object with two arrays:

The catalog is both arrays together: available leaves out what installed lists. Neither carries keywords or a category, so match on plugin name and description. Without --available the command lists installed plugins only. Field shapes are in REFERENCE.md.

Step 3: Read the enabledPlugins settings

From the project root, run bash ${CLAUDE_SKILL_DIR}/scripts/enabled-plugins.sh list. enabledPlugins is an object mapping plugin-name@marketplace-name to true (enabled) or false (explicitly disabled), and the script reads it that way for user, project and local settings:

A missing file or an unset enabledPlugins means no entries. On STATUS=ERROR (a settings file is not valid JSON) report the file and stop. On TYPE=not_object (an enabledPlugins that is not an object) report it and skip --fix until it is corrected by hand.

Step 4: Analyze plugin relevance

Compare each project entry against the detected tech stack. Use the plugin relevance mapping in REFERENCE.md to determine which plugins are relevant, irrelevant, or missing.

Categorize each plugin as:

Step 5: Generate the audit report

Print a structured report covering:

  1. Detected technology stack with evidence
  2. Currently enabled plugins with relevance status
  3. Suggested plugins to add (with reasons)
  4. Suggested plugins to remove (with reasons)
  5. Summary counts

Step 6: Apply changes (if --fix)

When --fix is passed:

  1. Ask for confirmation of each category of changes (removals, additions) with AskUserQuestion.
  2. Run bash ${CLAUDE_SKILL_DIR}/scripts/enabled-plugins.sh apply --settings .claude/settings.json --enable <id> --remove <id>, one flag per confirmed ID in plugin-name@marketplace-name form. The script copies the file to .claude/settings.json.backup, sets each --enable key to true, deletes each --remove key, keeps every other setting, and creates the file when it does not exist.
  3. Remove by deleting the key, not by writing false: project settings take precedence over user settings, so a project false would turn the plugin off for every teammate who enables it themselves.
  4. Verify by re-running list and report the ENABLED= and REMOVED= lines from the apply output.

With --dry-run, print the apply command you would run and stop.

User-Level vs Project-Level

This skill writes only project-level plugin settings in .claude/settings.json.

Precedence runs local over project over user: a user-level false does not disable a plugin the project enables, and a developer who wants it off on one machine sets it to false in .claude/settings.local.json. The list output carries USER_ENABLED=; a plugin enabled there needs no project entry unless the whole team should have it.

Edge Cases

| Scenario | Behavior |

|----------|----------|

| No .claude/settings.json | apply creates it with the confirmed plugins |

| Empty or unset enabledPlugins | Suggest adding relevant plugins |

| Entry set to false in project settings | Report as DISABLED; leave it unless the user asks |

| enabledPlugins is not an object | Report not_object; skip --fix |

| Monorepo with multiple languages | Suggest all matching plugins |

| Enabled ID in neither installed[].id nor available[].pluginId | Flag as "unknown" but don't remove |

| User declined changes | Respect decision, show manual instructions |

Agentic Optimizations

| Context | Command |

|---------|---------|

| Plugin relevance audit | /health:check --scope=stack |

| Audit with auto-fix | /health:check --scope=stack --fix |

| Dry-run mode | /health:check --scope=stack --fix --dry-run |

| Enabled plugins, all scopes | bash ${CLAUDE_SKILL_DIR}/scripts/enabled-plugins.sh list |

| Installed + marketplace catalog | claude plugin list --json --available |

Flags

| Flag | Description |

|------|-------------|

| --fix | Apply recommended changes (with confirmation) |

| --dry-run | Show what would be changed without modifying |

| --verbose | Show detailed reasoning for each decision |

See Also

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.