skills-doctor
Optionally audits the global skill roots installed for Hermes (skipped by default, enabled with --include-other-agents), including it in the shadowing, broken-reference and token-budget analysis.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Runs 100% locally. No telemetry, no account, no uploads — your skills, configuration and files never leave your machine. See Privacy.
OpenClaw injects every eligible skill into the system prompt as a compact XML block: roughly 97 characters plus name, description and location per skill, paid on every model step. This tool measures that cost, tells you which definition actually wins, and can trim or hide the expensive ones.
Three ways to run it — CLI, MCP server, or the native OpenClaw plugin
(a skills_doctor tool + /skills-doctor command). All of them share the same
audit core, so the numbers always match.
Contents
Related MCP server: cold-run
Quick start
npx -y openclaw-skills-doctor check # findings + per-step token cost
npx -y openclaw-skills-doctor plan # exact savings: trim and/or hide
npx -y openclaw-skills-doctor doctor # paths, roots, install state
npx -y openclaw-skills-doctor check --html openclaw-report.html --openNothing to configure: the wrapper resolves the state dir and workspace the same way OpenClaw does.
Or install the companion skill from ClawHub:
openclaw skills install @wangyuchen5110/skills-doctorExample output
$ npx -y openclaw-skills-doctor doctor
openclaw-skills-doctor doctor
cli: /usr/local/bin/openclaw
state dir: /home/you/.openclaw
workspace: /home/you/.openclaw/workspace
config: /home/you/.openclaw/openclaw.json
skill roots:
+ /home/you/.openclaw/workspace/skills
- /home/you/.openclaw/workspace/.agents/skills
- /home/you/.agents/skills
+ /home/you/.openclaw/skills
mcp entry: saved
bundled skill: installed
native plugin: installed + enabled
plugin dir: /home/you/.openclaw/extensions/openclaw-skills-doctorPrivacy: local-only, no data collection
Everything runs on your machine. No telemetry, no analytics, no account, and nothing is uploaded - not your skills, configuration or files.
Reads |
|
Never reads | chat history, sessions, transcripts, documents, source code, credentials or API keys |
Uploads | nothing: there is no server component, and the wrapper itself makes no network calls |
Network | none from the wrapper. The embedded core CLI ( |
Writes | only on |
openclaw.json can contain channel or provider credentials. It is parsed locally
only to find the entries this tool owns; values are never transmitted, printed or
copied into a report. Reports contain file paths and skill descriptions, never
file bodies. check, plan, scan and doctor work with the network offline.
What it audits
OpenClaw file-backed skill roots, highest precedence first:
Priority | Source | Path |
1 | Workspace skills |
|
2 | Project agent skills |
|
3 | Personal agent skills |
|
4 | Managed / local skills |
|
5+ | Extra dirs |
|
The wrapper hands those roots to the core auditor in exactly this order, so the
winning definition in a shadowing report matches what OpenClaw actually loads.
Other agents' global roots (Claude, OpenCode, Grok, Cursor, Kimi, Hermes) are
skipped by default; pass --include-other-agents to audit them too.
How it works
flowchart LR
A["OpenClaw skill roots<br/>workspace · .agents · state · extraDirs"] --> B["audit core<br/>parse · lint · token budget"]
B --> C{"findings?"}
C -->|"budget / duplicates / broken refs"| D["plan<br/>trim descriptions, hide skills"]
C -->|"always"| E["report<br/>compact tool · JSON · HTML · terminal"]
D --> F["fix<br/>archive (reversible) · autoinvoke:false"]
E --> G["agent / CI / you"]
F --> GEvery measurement is local and deterministic: the same skill files produce the same numbers, so the report is safe to diff in CI.
Install the integration
npx -y openclaw-skills-doctor installThat does two things and is idempotent:
saves the MCP server definition
mcp.servers.skills-doctorin~/.openclaw/openclaw.jsonby patching the config directly, with a timestamped backup (openclaw.json.bak-<timestamp>) and an atomic write. It never spawns theopenclawCLI, so it also works while the Gateway is running;installs the bundled
openclaw-skills-doctorskill into<workspace>/skills/openclaw-skills-doctor.
npx -y openclaw-skills-doctor install --mcp-only # just the MCP entry
npx -y openclaw-skills-doctor install --skill-only # just the bundled skill
npx -y openclaw-skills-doctor install --plugin # also the native plugin
npx -y openclaw-skills-doctor install --dry-run # show what would change
npx -y openclaw-skills-doctor uninstall # remove what install added
openclaw mcp doctor skills-doctor --probe # verify the server connectsRestart the Gateway (or run openclaw mcp reload) so the tool appears. MCP tools
are namespaced per server, so the agent calls skills-doctor__skills_doctor.
Native plugin (optional)
install --plugin copies the package into <state-dir>/extensions/openclaw-skills-doctor
and sets plugins.entries["openclaw-skills-doctor"].enabled = true. The plugin
adds:
a
skills_doctortool that returns a compact report (top findings, budget line, next step) instead of the full markdown - tool results are paid in the model context too;a
/skills-doctorcommand that prints the same report directly.
openclaw plugins inspect openclaw-skills-doctor --runtime --json # verify the loadPrefer a managed install for anything beyond local experiments:
openclaw plugins install clawhub:openclaw-skills-doctor # from ClawHub
openclaw plugins install ./openclaw-skills-doctor # from this checkoutThe ClawHub release passed the automated security audit (v0.3.4).
The plugin API is experimental; pin your OpenClaw version and re-run
openclaw plugins inspect ... --runtime after upgrades. This repository ships
plain JavaScript with no build step (no TypeScript, no TypeBox), so the plugin
entry is the same code the tests exercise.
Manual MCP setup
If you prefer to wire the MCP server yourself:
openclaw mcp add skills-doctor \
--command npx \
--arg -y \
--arg opencode-skills-doctor@0.9.4 \
--arg mcpor in ~/.openclaw/openclaw.json:
{
mcp: {
servers: {
"skills-doctor": {
command: "npx",
args: ["-y", "opencode-skills-doctor@0.9.4", "mcp"],
},
},
},
}Paths it resolves
What | Resolution order |
State dir |
|
Config |
|
Workspace |
|
Override any of them with --state-dir <dir>, --workspace <dir>, --home <dir>.
Commands
Command | What it does |
| audit sources, shadowing, token budget and broken references (default) |
| exact savings: which descriptions to trim, which skills to hide |
| every skill with its source, precedence and cost |
| archive shadowed duplicates (reversible) or hide low-frequency skills |
| MCP entry + bundled skill (+ optional native plugin), idempotent |
| CLI, state dir, config, workspace, roots, MCP/skill/plugin install state |
| run the MCP server on stdio |
Core flags work as usual: --json, --budget, --lang en|zh, --dry-run,
--strict, --html [file], --no-global.
Fixing what it finds
npx -y openclaw-skills-doctor plan # measure first
npx -y openclaw-skills-doctor fix --dry-run # see what would be archived
npx -y openclaw-skills-doctor fix # archive shadowed duplicates (reversible)
npx -y openclaw-skills-doctor fix --hide legacy-skillfix only archives definitions that never load, moving them to
.skills-doctor-archive/<timestamp>/ inside the same skill root. --hide adds
metadata.opencode/autoinvoke: false, which keeps the skill loadable through an
explicit @id reference while removing it from the model-facing list.
Safety
Local-only: no telemetry, no backend, nothing leaves the machine; the only optional network call is the core CLI's daily npm version check, which you can disable.
check,plan,scananddoctorare read-only and offline (no network, no LLM).install/uninstallback upopenclaw.jsonbefore rewriting it, preserve its existing permission bits (credentials files are usually0600), write atomically, and never spawn a child process. If the atomic replace fails the write fails closed: nothing is written and the original file stays intact.uninstallonly removes a bundled skill when itsSKILL.mdwas read successfully and still declaresname: openclaw-skills-doctor; otherwise it leaves the directory in place with a warning.Config parsing understands JSON with comments and trailing commas. A file that uses other JSON5-only syntax (unquoted keys, single quotes) is reported, never rewritten - use
openclaw mcp add/set/unsetthere instead.It is not a sandbox: it audits configuration and files, it does not constrain what the agent can do.
Development
npm install
npm test # 27 tests
npm run plugin:validate # offline manifest/entry/metadata consistencyRequires Node >= 20. MIT.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Statically audits MCP tool surfaces for token cost, schema quality, and design issues.
Audit MCP configs and skill files for over-broad scope and injection risk. 6 of 8 free.
Search the SkillSafe registry of security-scanned agent skills and scan skill files for risks.
Vet an agent skill before you install it: structure, triggers, secrets.
Related MCP Servers
- AlicenseAqualityCmaintenanceShows what is consuming your agent context window before a session starts: always-loaded skill descriptions ranked by token cost, skills installed more than once under different names, CLAUDE.md/AGENTS.md sizes including what their @import lines pull in, and MCP servers configured across clients. Read-only: no child processes, no network.560 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables you to audit your AI agent skills by running each one against an agent that cannot see it, diffing the resulting artifacts, and grading whether each skill genuinely improves, changes nothing, or worsens the output.MIT
- AlicenseNot gradedqualityDmaintenanceEnables authorized security auditing of AI-agent supply chains and agent-facing surfaces: deterministic local skill-bundle audits against eight attack patterns, secrets scanning, and scope-gated read-only recon of agent endpoints and MCP surfaces.MIT
- AlicenseNot gradedqualityBmaintenanceEnables auditing coding-agent claims against local execution traces to detect contradictions, exposing session audits, recent failures, and optional scope-alignment triage.MIT