Skip to content
Automation
Skill

/doctor

System diagnostics and health checks for Diverga plugin. OpenClaw-style Check-Report-Fix pattern with 5-layer diagnostics. Triggers: /diverga:doctor, diverga doctor, system check, diagnose, 진단

From plugin
auto-empirical-research-skills
4.9k200 skills

Claude Code

$ npx -y skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill doctor --agent claude-code

SKILL.md

doctor.SKILL.md
name: doctor
description: |
  System diagnostics and health checks for Diverga plugin.
  OpenClaw-style Check-Report-Fix pattern with 5-layer diagnostics.
  Triggers: /diverga:doctor, diverga doctor, system check, diagnose, 진단
version: "12.0.1"

Diverga Doctor

**Version**: 11.1.0 **Trigger**: `/diverga:doctor`

Description

System diagnostics for the Diverga plugin. Checks plugin health, skill sync, hook enforcement, configuration validity, API keys, and project state. Reports issues with actionable fix commands.

Follows OpenClaw Check-Report-Fix pattern: every detected issue includes a fix recommendation.

Instructions

When user invokes `/diverga:doctor`, execute all 7 diagnostic layers sequentially and display results.

Layer 1: Plugin Health

**Check plugin registration:**

  • Read `~/.claude/plugins/installed_plugins.json`
  • Verify `diverga@diverga` entry exists
  • Extract version and install date

**Check config JSON validity:**

  • Read `~/.claude/plugins/diverga/config/diverga-config.json`
  • Verify it parses as valid JSON
  • Check required fields exist: `version`, `human_checkpoints`, `language`

**Report format:**

PLUGIN HEALTH
  Registration:    [PASS - diverga@diverga v11.1.0 | FAIL - not found in installed_plugins.json]
  Config file:     [PASS - valid JSON | FAIL - missing or invalid]
  Config fields:   [PASS - all required fields present | WARN - missing: field1, field2]

**Fix if FAIL:**

  • Registration missing: "Run: /plugin install diverga"
  • Config missing: "Run: /diverga:setup to regenerate configuration"
  • Config invalid JSON: "Config file is corrupted. Run: /diverga:setup to regenerate"

Layer 2: Skill Sync

**Check skill counts match between plugin and local cache:**

  • Use Glob to count directories in `~/.claude/plugins/diverga/skills/*/SKILL.md`
  • Use Glob to count directories in `~/.claude/skills/diverga-*/SKILL.md` (exclude `diverga-diverga` prefix duplication — count unique skill names)
  • Compare counts

**Check for missing skills in local cache:**

  • For each skill in plugin directory, check if corresponding `diverga-{name}` exists in local skills
  • List any missing skills

**Report format:**

SKILL SYNC
  Plugin skills:   [count] skills in plugin directory
  Local skills:    [count] skills in local cache
  Sync status:     [PASS - all synced | WARN - X skills missing locally]
  Missing:         [list of missing skill names, if any]

**Fix if WARN:**

  • "Missing local skills. To resync, reinstall the plugin or manually copy:"
  • For each missing skill: " cp -r ~/.claude/plugins/diverga/skills/{name} ~/.claude/skills/diverga-{name}"

Layer 3: Plugin Cache Sync

**Check that the plugin cache matches the installed version:**

  • Read `~/.claude/plugins/diverga/plugin.json` → extract `version`
  • Glob `~/.claude/plugins/cache/diverga/diverga/*/plugin.json` → list cached versions
  • Compare: cached version should match installed version
  • Check if cached version has `hooks/hooks.json`

**Report format:**

PLUGIN CACHE
  Installed version: [11.1.0 | FAIL - plugin.json missing]
  Cached version:    [11.1.0 | WARN - stale cache: 8.0.1 | FAIL - no cache found]
  Cache has hooks:   [PASS - hooks.json present | FAIL - hooks missing from cache]
  Cache has agents:  [PASS - agents/ present | WARN - agents/ missing]

**Fix if WARN/FAIL:**

  • Stale cache: "Plugin cache is outdated. Run in terminal:"
  REPO="/Volumes/External SSD/Projects/Diverga/Diverga-core"
  CACHE="$HOME/.claude/plugins/cache/diverga/diverga/11.1.0"
  rm -rf "$HOME/.claude/plugins/cache/diverga/diverga/8.0.1"
  mkdir -p "$CACHE"
  cp -R "$REPO"/{skills,agents,config,hooks,mcp,CLAUDE.md,AGENTS.md,README.md} "$CACHE/"
  cp "$REPO/.claude-plugin/plugin.json" "$CACHE/"
  • No hooks in cache: "Copy hooks manually: cp -R ~/.claude/plugins/diverga/hooks/ $CACHE/hooks/"
  • Restart Claude Code after cache update for changes to take effect

Layer 4: Hook Enforcement

**Check hook configuration:**

  • Read `~/.claude/plugins/diverga/hooks/hooks.json` → verify it exists and has `PreToolUse` entries
  • Check matchers include "Agent" and "Skill" (not "Task" — known bug in pre-11.1.0)
  • Read `~/.claude/settings.json` → check if hooks are also configured at global level
  • Test hook execution: Run `echo '{"tool_name":"Skill","tool_input":{"skill":"diverga:c1"}}' | node ~/.claude/plugins/diverga/hooks/prereq-enforcer.mjs` → verify it returns valid JSON with `continue` field

**Report format:**

HOOK ENFORCEMENT
  Plugin hooks.json: [PASS - exists with Agent+Skill matchers | FAIL - missing or wrong matchers]
  Global hooks:      [PASS - configured in settings.json | WARN - not in settings.json (relies on plugin)]
  Hook executable:   [PASS - returns valid JSON | FAIL - execution error]
  Matcher check:     [PASS - uses "Agent" | FAIL - uses stale "Task" matcher]

**Fix if issues found:**

  • Wrong matcher: 'Change "Task" to "Agent" in hooks.json — Claude Code uses "Agent" as tool name'
  • Not in settings.json: "Add hooks to ~/.claude/settings.json for reliable enforcement across sessions"
  • Execution error: "Check that better-sqlite3 is installed: cd ~/.claude/plugins/diverga/mcp && npm install"

Layer 5: Config Validity

**Deep validation of diverga-config.json:**

  • Read `~/.claude/plugins/diverga/config/diverga-config.json`
  • Check `version` field matches "11.1.0"
  • Check `human_checkpoints` object exists and has `enabled` (boolean) and `required` (array)
  • Check `language` is one of: "en", "ko", "auto"
  • Check `model_routing` has `high`, `medium`, `low` keys if present

**Report format:**

CONFIG VALIDITY
  Version field:   [PASS - 11.1.0 | WARN - version mismatch: found X.Y.Z]
  Checkpoints:     [PASS - configured | FAIL - missing or malformed]
  Language:        [PASS - "en" | WARN - unexpected value: "XX"]
  Model routing:   [PASS - configured | SKIP - not set (using defaults)]

**Fix if issues found:**

  • Version mismatch: "Config version X.Y.Z doesn't matc
Read more
@brycewang-stanford
Ships withauto-empirical-research-skills

## 🔥 力荐 · StatsPAI — Stata 与 R 的 Python 平替,为 AI Agent 而生 🔁 Stata / R 平替:reghdfe、csdid、rdrobust、synth、fixest、did 等常用命令在 Python 中一站式替代,一个 import statspai as sp 搞定 DID / RD / IV / SCM / DML / matching 🤖 面向 Agent 设计:结构化结果对象 + 内置 MCP Server,Claude / Codex

4.9k200 skills
Get the whole plugin

Stars on GitHub

Momentum

stars in total
4.9k
Star history of brycewang-stanford/Auto-Empirical-Research-Skills on GitHub, a chart by star-history.com

More skills from other plugins.

agent-builder

agent-builder

Load immediately after an Agent intent, before the first agent_builder_* call. Governs how you create, configure, test, and…

n8n11d209k
@n8n-io@n8n-ioInstall Skill
browser-use

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…

@browser-use@browser-useInstall Skill
agent-browser

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…

@vercel-labs-2@vercel-labs-2Install Skill
add-anydoc

add-anydoc

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when…

@nanocoai@nanocoaiInstall Skill

Questions about doctor.

Which coding agents can use doctor?
doctor installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.