doctor

doctor is a command for Claude Code from kimsanguine/llm-brain. It costs 20 tokens per session (901 once invoked), scanned A, original, MIT.

A diagnostic command for checking and, when requested, repairing an llm-brain installation. It also offers read-only profiles for demo, private use, or preparing a shareable setup.

In plain words
What is it for?
Use it to run diagnostics, create missing directories, safely copy a configuration template, preview an operating profile, or check the requirements for a share-ready export.
Why use it?
It helps identify missing setup pieces and gives clear next actions without changing personal content during guided checks.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is uv run python scripts/doctor.py $ARGUMENTS.

Part of the llm-brain plugin — 7 commands shipped together

Good fit Use it to run diagnostics, create missing directories, safely copy a configuration template, preview an operating profile, or check the requirements for a share-ready export.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/kimsanguine/llm-brain
agentmods
npx agentmods add commands/kimsanguine/llm-brain/doctor

Made for: Claude Code.

Or install llm-brain, the plugin that ships this one along with the rest of its 7 commands.

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 doctor

README.md
[![agentmods](https://agentmods.dev/badge/commands/kimsanguine/llm-brain/doctor.svg)](https://agentmods.dev/commands/kimsanguine/llm-brain/doctor)
Your own site
<a href="https://agentmods.dev/commands/kimsanguine/llm-brain/doctor"><img src="https://agentmods.dev/badge/commands/kimsanguine/llm-brain/doctor.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 901 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.00020 $0.00901
Opus 5 $0.00010 $0.00451
Sonnet 5 $0.00004 $0.00180
Haiku 4.5 $0.00002 $0.00090

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

Security

Grade A, and why

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 8d 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.

commands/doctor.md · 56 lines

How it starts

The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.

llm-brain의 doctor 커맨드입니다. 설치를 진단·복구하거나, --guided로 쓰기 전 운영 프로필을 선택합니다. $ARGUMENTS에 따라 아래를 실행하세요.

인자

  • 인자 없음 → 진단만 (llm-brain 제품/개인 데이터 변경 없음)
  • --fix → 안전 복구: 누락 디렉토리 생성 + schema/sources.yaml이 없으면 sources.example.yaml에서 복사. 기존 파일은 절대 덮어쓰지 않음.
  • --guided읽기 전용 프로필 3개(Demo, Personal-private, Share-ready)만 표시
  • --guided --profile demo|personal-private|share-ready → 선택한 프로필의 명시적 다음 행동 1개만 표시

--guided--fix와 함께 쓸 수 없고, 진단·디렉터리 생성·config 복사·개인 콘텐츠 스캔을 실행하지 않습니다. doctor.py 자체는 제품/개인 데이터를 변경하지 않지만, 실행기인 uv run은 Python 환경이나 패키지 캐시를 생성·갱신할 수 있습니다.

Guided 프로필

  • Demo — 기존 examples/seed-wiki/wiki를 읽는 일회성 설치 검증 안내(브라우저 UI 체험은 wikiweb의 데모 절차 사용)
  • Personal-privateschema/sources.yaml이 있으면 사용자 설정을 preview하고, fresh clone처럼 없으면 존재하는 schema/sources.example.yaml 템플릿 preview 안내
  • Share-ready — canonical schema/okf_export.yaml, local schema/okf_export.local.yaml, 모든 후보의 명시적 scope: shared|private 확인 후 정확한 scripts/okf_export.py --share --approve-share I_ACKNOWLEDGE_SHARE_READY_EXPORT 다음 행동 하나를 안내

실행

cd "$(git rev-parse --show-toplevel)"  # llm-brain 레포 루트
uv run python scripts/doctor.py $ARGUMENTS

(uv 미설치 시: .venv/bin/python scripts/doctor.py $ARGUMENTS)

점검 항목

  • 필수 디렉토리: raw/(7 하위 채널)·wiki/·schema/·scripts/·commands/·procedures/·examples/
  • 스크립트(메모리 OS 포함): ingest·curate·express·okf_export·export_graph·sync_raw + episode·brain_context·memory_health·procedures·lib/frontmatter_utils
  • 커맨드: ingest·curate·express·query·okf·doctor·wikiweb
  • 설정: schema/config.yaml(LLM 엔진)·schema/sources.yaml(소스 — gitignored, 없으면 WARN)
  • 의존성: pyyaml·fastapi·uvicorn·httpx·python-frontmatter (uv sync로 설치)
  • claude CLI: cli 엔진(기본) 사용 시 필요 (없으면 WARN)

결과 해석

  • FAIL = 설치 문제 → 해결 필요(디렉토리는 doctor --fix, 의존성은 uv sync, 스크립트/커맨드 누락은 플러그인 재설치·git pull).
  • ⚠️ WARN = 선택/환경별(설정 파일·claude CLI 등) — 필요 시 안내대로.
  • exit 0 = FAIL 없음(설치 정상) · exit 1 = FAIL 있음.

Read the full file on GitHub · 56 lines

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. 8d ago First seen · 56 lines · 20 tokens per session scan A 1b1390d6ba09

Subscribe to this mod's changes

doctor is a command published in the GitHub repository kimsanguine/llm-brain (10 stars, last pushed 24d ago), licensed MIT. It adds 20 tokens to every session and 901 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.