/health-plugin:health-check [--scope=all|registry|stack|agentic|runtime|usage] [--fix] [--dry-run] [--verbose]from health-plugin
Runs comprehensive Claude Code environment diagnostics in a single pass — checks plugins, settings, hooks, MCP servers, runtime, permissions, and marketplace enrollment. Supports `--fix` to repair broken layers.
Ships in health-plugin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Single entry point for Claude Code health diagnostics. Runs environment checks (plugin registry, settings, hooks, MCP servers, SessionStart executability, pre-commit validity, permissions coverage, marketplace enrollment) plus optional deeper audits, and routes --fix to the appropriate internal workflow.
| Use this skill when... | Use another approach when... |
|---|---|
| Running Claude Code diagnostics | Viewing raw settings (use Read on settings.json) |
| Troubleshooting plugin registry issues | Inspecting marketplace metadata manually |
| Auditing plugins for project fit | Installing a specific plugin (use /plugin install) |
| Checking skill agentic-optimisation quality | Editing a single known skill |
One-stop --fix across registry/stack/agentic | Precise surgical edits to a single file |
pwdfind . -maxdepth 2 -path '*/.claude/settings.json'find . -maxdepth 2 -path '*/.claude/settings.local.json'Parse these from $ARGUMENTS:
| Parameter | Description |
|---|---|
--scope=<all|registry|stack|agentic|runtime|usage> | Which audits to run. Default all. |
--fix | Apply fixes to findings (prompts for confirmation). |
--dry-run | Preview fixes without modifying files. |
--verbose | Include detailed diagnostics. |
Scope semantics:
| Scope | Covers |
|---|---|
registry | Plugin registry health (orphaned projectPath, stale enabledPlugins, registry-vs-settings drift) |
stack | Enabled plugins vs detected project tech stack |
agentic | Skill/command/agent agentic-optimisation compliance |
runtime | ~/.claude.json bloat, history.jsonl growth, cleanupPeriodDays validity. Read-only. |
usage | Never-fired and dormant skills and plugin agents, mined from session transcripts. Read-only; SKIPs when history is insufficient. |
all | Environment checks + all five audits |
Execute this diagnostic router. Default scope is all when --scope is not provided.
Run every bundled script exactly as spelled in this file, path unquoted: each allowed-tools rule pre-approves only the command text it spells, and any other spelling goes through the normal permission flow. Add no $(…) substitution: Claude Code does not pre-approve a command containing one, and every script already defaults --project-dir to the working directory.
These run regardless of --scope.
bash ${CLAUDE_SKILL_DIR}/scripts/check-plugins.sh --home-dir "$HOME"
bash ${CLAUDE_SKILL_DIR}/scripts/check-plugin-scope-lag.sh --home-dir "$HOME"
bash ${CLAUDE_SKILL_DIR}/scripts/check-settings.sh --home-dir "$HOME"
bash ${CLAUDE_SKILL_DIR}/scripts/check-hooks.sh --home-dir "$HOME"
bash ${CLAUDE_SKILL_DIR}/scripts/check-mcp.sh --home-dir "$HOME"
bash ${CLAUDE_SKILL_DIR}/scripts/check-permissions-coverage.sh --home-dir "$HOME"
bash ${CLAUDE_SKILL_DIR}/scripts/check-marketplace-enrollment.sh --home-dir "$HOME"
Parse STATUS=, REASON= (when present), CONFIGURED= (hooks, MCP) and ISSUES: from each. Pass --verbose when set on $ARGUMENTS. Read each script's extra keys as described in references/environment-checks.md, and name the file each finding came from: the settings or .mcp.json file, the plugin that declared a hook, the project path and both versions for scope_lag, the tool and task file for missing_permission.
Run each check as specified in references/environment-checks.md and score it OK/WARN/ERROR (pre-commit may SKIP when the tool is absent).
For --scope=registry or all:
bash ${CLAUDE_PLUGIN_ROOT}/skills/health-plugins/scripts/check-registry.sh --home-dir "$HOME"
Parse STATUS=, PLUGIN_COUNT=, ORPHANED_ENTRIES=, STALE_ENABLED_ENTRIES=, and ISSUES:.
For --scope=stack or all: invoke the health-plugin:health-audit skill with the Skill tool, passing --verbose when set. Load it through the Skill tool rather than reading its SKILL.md: only a loaded skill gets its own ${CLAUDE_SKILL_DIR} substituted and its own allowed-tools (its enabled-plugins.sh and claude plugin list commands are not granted here).
For --scope=agentic or all: invoke the health-plugin:health-agentic-audit skill with the Skill tool the same way, passing --verbose when set.
For --scope=runtime or all:
bash ${CLAUDE_SKILL_DIR}/scripts/check-runtime.sh --home-dir "$HOME"
Parse STATUS=, ISSUES:, CLEANUP_SUGGESTED= and the per-finding counts listed in references/audit-scopes.md, which also documents --history-warn-mb and --verbose. The audit is read-only: it prints suggested cleanups (claude purge <path> --dry-run for dead projects, jq filters otherwise) for the operator.
Close every other Claude Code session before acting on these cleanups. The harness rewrites
~/.claude.jsonon session end, so a live session's in-memory state overwrites your edits.
For --scope=usage or all:
bash ${CLAUDE_SKILL_DIR}/scripts/check-usage.sh --home-dir "$HOME"
Parse STATUS=, REASON= (when present), ISSUES: and the counts listed in references/audit-scopes.md, which also documents --window-days and --verbose. The audit is read-only and advisory (review candidates, not a delete list); it reports SKIPPED=true (cause in SKIP_REASON=) on insufficient history and WARNs on transcript schema drift. Never read pluginUsage.usageCount for it.
Print a consolidated report grouped by scope:
reviewed dates (CLI-wrapper skills without an Agentic Optimizations table appear as INFO only)~/.claude.json size and bloat findings, history.jsonl size, effective cleanupPeriodDays (read-only — no --fix path)--fix path; SKIPs when history is insufficient)Use STATUS= indicators (OK/WARN/ERROR) and issue counts per scope. Include the one-row-per-check table from REFERENCE.md § Summary Table.
See REFERENCE.md for the full report template.
--fix)If --fix is set:
If --scope=all AND findings exist in multiple scopes, use AskUserQuestion to let the user pick which scopes to fix (multi-select: registry, stack, agentic).
For each selected scope, delegate:
| Scope | Delegate to |
|---|---|
registry | bash ${CLAUDE_PLUGIN_ROOT}/skills/health-plugins/scripts/fix-registry.sh --home-dir "$HOME" (append --dry-run when set) |
stack | Skill tool: health-plugin:health-audit with --fix (plus --dry-run when set); it runs its own Step 6 |
agentic | Skill tool: health-plugin:health-agentic-audit with --fix; it runs its own Step 6 |
Parse each script's output (STATUS=, REMOVED_COUNT=, MESSAGE=, RESTART_REQUIRED=) and report what changed.
If any fix reports RESTART_REQUIRED=true, remind the user to restart Claude Code.
Permissions coverage has no --fix path: report the missing rules and let the user decide which to add.
Re-run the relevant checks and confirm issue counts have dropped.
Per-scope invocations and quick manual checks: references/command-reference.md.
Known symptoms and their fix paths: references/known-issues.md.
REFERENCE.md (opens in a new tab)references/audit-scopes.md (opens in a new tab)references/command-reference.md (opens in a new tab)references/environment-checks.md (opens in a new tab)references/known-issues.md (opens in a new tab)scripts/check-hooks.sh (opens in a new tab)scripts/check-marketplace-enrollment.sh (opens in a new tab)scripts/check-mcp.sh (opens in a new tab)scripts/check-permissions-coverage.sh (opens in a new tab)scripts/check-plugin-scope-lag.sh (opens in a new tab)scripts/check-plugins.sh (opens in a new tab)scripts/check-runtime.sh (opens in a new tab)scripts/check-settings.sh (opens in a new tab)scripts/check-usage.sh (opens in a new tab)scripts/lib/retention.sh (opens in a new tab)scripts/lib/summary.sh (opens in a new tab)scripts/tests/test-check-hooks.sh (opens in a new tab)scripts/tests/test-check-marketplace-enrollment.sh (opens in a new tab)scripts/tests/test-check-mcp.sh (opens in a new tab)scripts/tests/test-check-permissions-coverage.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub laurigates/claude-plugins --plugin health-plugin7 skills in this plugin
/health-agentic-auditAudit skills, commands, and agents for bare CLI commands lacking compact, fail-fast, or JSON flags, and stale reviews. Use when batch-checking skill documentation quality./health-auditPlugin 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./health-pluginsRun check-registry.sh and fix-registry.sh: find orphaned projectPath rows and stale enabledPlugins keys, back up, remove. Use when seeing plugin-already-installed errors or registry drift./health-skill-auditSkill-overlap report for a plugin repo — confusable siblings, split-pressure, merge candidates. Use when two skills seem to answer one request, or a long SKILL.md may need a REFERENCE.md split./plugin-registryClaude Code plugin registry structure, install scopes, and version lag. Use when troubleshooting plugin problems, a stale plugin version in one project, or fixing registry entries./settings-configurationClaude Code settings precedence and permission rules: allow/ask/deny, modes, Bash wildcards. Use when writing permissions or a setting won't apply.Other plugins' skills for the same job