wiki-doctor

wiki-doctor is a command for Claude Code from entropyeq/karpathy-plus. It costs 15 tokens per session (226 once invoked), scanned A, original, MIT.

A diagnostic command for checking whether a local wiki’s files, scripts, settings, and Git setup are connected correctly.

In plain words
What is it for?
It checks the wiki path, index file, startup and session-end hooks, settings, Git remote, and ignore file, then reports failures and their suggested fixes.
Why use it?
It shows where the wiki installation chain is broken, so you do not have to inspect paths, hooks, and configuration by hand.

Command for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: reads .claude/ paths.

Good fit It checks the wiki path, index file, startup and session-end hooks, settings, Git remote, and ignore file, then reports failures and their suggested fixes.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/entropyeq/karpathy-plus/wiki-doctor
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/entropyeq/karpathy-plus

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wiki-doctor

README.md
[![agentmods](https://agentmods.dev/badge/commands/entropyeq/karpathy-plus/wiki-doctor/github.svg)](https://agentmods.dev/commands/entropyeq/karpathy-plus/wiki-doctor)
Your own site
<a href="https://agentmods.dev/commands/entropyeq/karpathy-plus/wiki-doctor"><img src="https://agentmods.dev/badge/commands/entropyeq/karpathy-plus/wiki-doctor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for wiki-doctor

Your own site · 80×15
<a href="https://agentmods.dev/commands/entropyeq/karpathy-plus/wiki-doctor"><img src="https://agentmods.dev/badge/commands/entropyeq/karpathy-plus/wiki-doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 226 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00015 $0.00226
Opus 5 $0.00008 $0.00113
Sonnet 5 $0.00003 $0.00045
Haiku 4.5 $0.00002 $0.00023

Measured 10d ago against content hash ca886d3310d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

wiki-doctor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

runtime/commands/wiki-doctor.md · 18 lines

What it actually says

Run the doctor script and interpret its results:

bash ~/.claude/hooks/wiki-doctor.sh

It checks the whole install chain mechanically: wiki path resolves, INDEX.md exists, both hooks are present and wired in valid settings.json, the session-end hook is actually configured (not placeholders), the SessionStart injection really produces the index, and the wiki is a git repo with a remote and a .gitignore.

Then:

  1. Report the output to the user, PASS lines compressed to one summary line, each WARN/FAIL quoted with its fix hint.
  2. For each FAIL, offer to apply the fix now (they map to SETUP.md steps 2-4). Fix only with the user's go-ahead, one at a time, re-running the doctor after each to confirm.
  3. If everything passes and the user was debugging a retrieval problem ("Claude doesn't know X"), the install chain is not the culprit: check instead whether the fact is actually on a wiki page that INDEX.md links.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 18 lines · 15 tokens per session scan A ca886d3310d4

Subscribe to this mod's changes

wiki-doctor is a command published in the GitHub repository entropyeq/karpathy-plus (5 stars, last pushed 1mo ago), licensed MIT. It adds 15 tokens to every session and 226 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.