plugin/skills/plugin-doctor/SKILL.md
Use this skill when installing the plugin, upgrading to a new version, or troubleshooting unexpected plugin behavior — a self-diagnostic for the ai-skills plugin that validates skill frontmatter, hook executability, run-log parseability, and judge calibration. Default mode is fast and cost-free; `--calibrate-judge` is opt-in.
npx skillsauth add avav25/ai-assets plugin-doctorInstall 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.
Check that the plugin is installed correctly and operating within healthy bounds. Default mode is fast (linter-only, no LLM cost) and always passes on a clean install.
Shipped commands:
/plugin-doctor # default smoke test (Tier 1 linters)
/plugin-doctor --calibrate-judge # opt-in: judge calibration vs samples
/plugin-doctor --show-recent-errors # top-5 hooks by ERROR/WARN count (audit WP-4.2)
Planned (not yet shipped):
/plugin-doctor --runs --last N # summarize last N workflow runs
/plugin-doctor --health-trends # context-health metrics summary (G8)
Both --runs and --health-trends will land once .ai-skills-memory/runs.jsonl accumulates enough entries to make the summary meaningful. Track progress in the plugin issue tracker.
/plugin-doctor)Wraps plugin/eval/runner.py --tier 1 — runs and reports on:
name + description present, kebab-case name matches parent dir, recognizable Use when trigger phrase (H5 regex from runner.py).plugin/hooks/hooks.json resolves to an existing script under ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/. Both bare-path and the v0.3.3 python3 ${CLAUDE_PLUGIN_ROOT}/... wrapper form accepted.py_compile in the runner)..ai-skills-memory/runs.jsonl parses (JSON-syntax check; richer summaries are planned via --runs --last N, see Planned section above).plugin/schemas/*.json + eval/config.json + monitors/monitors.json + .claude-plugin/plugin.json parse cleanly.Note: schema files are checked for valid JSON syntax, not full JSON Schema draft 2020-12 validation; the $schema URI declares draft 2020-12 but the runner does not currently re-validate against it.
Reports calibration as not yet run; use /plugin-doctor --calibrate-judge to run.
--calibrate-judge (explicit opt-in)Delegates to the Tier 2 smoke runner — plugin/eval/runner.py --tier 2 — which performs a score-band tolerance check against plugin/eval/calibration/<rubric>/ samples. For each sampled rubric, the Haiku judge scores known good + known bad samples and the result must land within ±0.5 of the expected score encoded in the filename (<scenario>.score-X.X.md).
Catches three drift classes: rubric edits that break scoring, judge-model version changes, and calibration-sample edits that move them out of band.
Errors clearly when samples are missing or count too low (< 4 per rubric):
ERROR: Insufficient calibration samples at plugin/eval/calibration/<rubric>/.
Expected ≥ 4 (good + bad pairs). Found N.
See plugin/docs/concepts/eval.md for guidance.
Requires ANTHROPIC_API_KEY and the anthropic Python SDK; without them the run reports DRY-RUN ONLY and skips real judge calls. Default sample plan (seed 42): 10 rubrics × 2 samples = 20 judge calls. Override with --seed, --sample-rubrics, --samples-per-rubric on runner.py.
--show-recent-errors (recent-errors dashboard)Surfaces the top hooks ranked by ERROR + WARNING count in .ai-skills-memory/errors.log over the last 7 days (default window). Ranking is ERROR * 10 + WARNING so a hook with a few ERRORs ranks above a hook with many INFO-level WARNINGs. For each hook the dashboard shows the top 3 issue strings and counts so the root cause of a noisy hook is one glance away.
Invocation:
python3 ${CLAUDE_PLUGIN_ROOT}/dev/recent-errors.py [--days N] [--top K] [--json]
Run from the project root (the script defaults to <cwd>/.ai-skills-memory/errors.log). No LLM cost; fail-open on missing log or parse errors. Typical output (real f4ai data, 7-day window):
Recent errors — last 7 day(s) (since 2026-05-06T13:40:33Z)
Total events: 5918
Distinct hooks: 7
Top 5 hooks by severity (ERROR weighted 10x):
1. tool-output-normalize ERR=0 WARN=5356 INFO=0
└ wrap_marker_missing_before_normalize x 5356
2. subagent-stop-learnings ERR=351 WARN=0 INFO=0
└ return_contract_validation_failed x 351
…
Use --json for machine-readable output (e.g. CI dashboards). Use --days 1 for a same-day triage view.
--runs --last N and --health-trends are documented for design continuity. The runner does not currently expose these flags; invoking them will fall through to the default Tier 1 path (or error on the unknown flag depending on shell). Track shipping in the plugin issue tracker.
.ai-skills-memory/plugin-doctor.log — append-only audit log.ai-skills-memory/: report as "first run — no history yet"; suggest /ai-skills-initpython3 ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/<name>.py (commit 4ea3347), which does not need the exec bit. Reverting to the bare ${CLAUDE_PLUGIN_ROOT}/... form would re-introduce the v0.3.2 "Permission denied" install bug. Report this as INFO only, not as a warning.hooks.json command starts with python3 ${CLAUDE_PLUGIN_ROOT}/... rather than ${CLAUDE_PLUGIN_ROOT}/...: expected since v0.3.3 — same reason as above. The Tier 1 linter (plugin/eval/runner.py) accepts both forms by searching for the placeholder substring rather than requiring it at position 0. If a third-party validator still flags the wrapper form, treat it as a linter-bug, not a plugin-bug.marketplace.json missing at the cache root (~/.claude/plugins/cache/<owner>/<plugin>/.claude-plugin/marketplace.json): expected in claude --plugin-dir install mode. The repo-level /<repo>/.claude-plugin/marketplace.json is the source-of-truth and is consumed only by /plugin marketplace add. --plugin-dir is the supported install mode for local development of this repo (per repo README.md and CLAUDE.md); the cache-root warning can be ignored unless distributing via marketplace.plugin/ for lints; .ai-skills-memory/runs.jsonl, plugin-doctor.log for summarieseval/runner.py --tier 1 (Tier 1 linters); eval/runner.py --tier 2 if --calibrate-judge.ai-skills-memory/plugin-doctor.log (audit trail)development
Use this skill when running the recurring (daily) knowledge-base rescan for a repo that already has knowledge/.knowledge-sync.yml — the main-thread dispatcher that reads the config, computes the git delta since last_scanned_sha, maps changed paths to affected doc areas, early-exits cheaply when nothing changed, then fans out one Agent(content-writer) per affected area, applies the propose/direct update policy, advances the baseline only on success, and writes an L4 run log — all with the G1 untrusted-content choke-point, secret-scan, deny-list, and budget controls woven in. For first-time setup use /knowledge-sync-init.
development
Use this skill when bootstrapping scheduled knowledge-base sync for a repo that has no knowledge/.knowledge-sync.yml yet — to run one-time setup that detects the knowledge_root from CLAUDE.md/AGENTS.md, maps doc areas to source globs, records opt-in external sources (Linear/Notion/WebFetch, all disabled by default), captures a baseline last_scanned_sha, sets the per-area update policy, generates or seeds knowledge/CONVENTIONS.md, provisions the L4 memory dir, and offers to register the daily routine. Routes ongoing recurring sync operations to /knowledge-sync.
tools
Use this skill when bootstrapping a target repository to be ai-skills-aware — on the first run of any ai-skills workflow in a fresh repo, when adopting the ai-skills plugin in an existing repo, or after upgrading to a plugin version that adds new memory paths or templates, including when the user does not say "init" but asks to "set up" or "onboard" the repo — to detect codebase type, create CLAUDE.md + AGENTS.md scaffolding, initialize the .ai-skills-memory/ directory tree from L1 templates, and configure .gitignore. Idempotent — safe to re-run. Accepts `--codebase-type <type>` and `--overwrite`. Not for re-initializing only memory — use `/memory-init` instead.
tools
Use this skill when extending, repairing, or improving plugin assets, when ingesting a `/feedback` report as a fix-cycle backlog, or when you do not remember which lower-level command is right for the job — the umbrella workflow for ai-skills plugin-asset authoring and maintenance: creating, auditing, fixing, improving, refactoring, and migrating skills, agents, rules, hooks, prompts, schemas, and rubrics inside the plugin. Auto-classifies the request, loads the right knowledge skills (`@prompt-engineering`, `@context-engineering`, `@team-protocols`), and spawns the right subagents (`prompt-engineer`, `system-architect`, `python-engineer`, `software-engineer`, `qa-engineer`, `eval-judge`) via the `Agent` tool.