SKILL.md--- name: autorag-doctor description: Diagnose and repair a broken or half-working AutoRAG install so every configured source is both indexed and searchable. Checks AutoRAG, MinSync, Jikji, the embedding backend, and every CLI-backed datasource (lazykatok, discrawl, slacrawl, wacrawl, telecrawl, notcrawl, mailcrawl), then fixes orphan locks, orphan processes, embedding dimension or identity mismatches, stale indexes, and missing setup. Use when search returns nothing or too little, refresh hangs or fails, a datasource disappeared from results, indexes look stale, the embedder is unavailable, or the user asks to check, diagnose, verify, or repair AutoRAG. license: Apache-2.0 --- # AutoRAG doctor Goal: every configured datasource is **indexed** *and* **actually returns hits**. A green `status` is not enough — the run is done only when a real query returns a real hit per datasource, or the datasource is reported as genuinely empty or not configured. Always finish with the status table in [Report](#report). ## Safety - Diagnosis and repair never delete, move, or edit source documents; a doctor run changes only AutoRAG-owned state. - Never delete a datasource's **native** store (`~/Library/Application Support/katok`, `~/.discrawl`, `~/.mailcrawl`, Telegram/WhatsApp/Notion archives). AutoRAG only reads them; rebuilding them is the owning CLI's job. - Only AutoRAG-owned state under `AUTORAG_HOME` and the workspace `.autorag` directory may be reset. - Never print token or password values. Report credential **names** only. - Kill a process only after confirming it is an AutoRAG-owned orphan. ## 1. Triage the core ```bash autorag status --json autorag health --json autorag setup --format json ``` - `status` reports `state`, `stale`, `diagnostics`, and per-component state for `minsync`, `jikji`, and `datasources`. `stale: true` or any `stale-index` diagnostic means the corpus changed since the last successful refresh. - `health` resolves the single search model and does one live completion probe. `--skip-probes` only proves config shape, never live access; do not claim a healthy model from it. - `setup --format json` reports `embedding.backend` (`remote`, `daemon`, or `in-process`) and the resolved `provider`/`model`/`dimension` when a backend is alive, or `embedding.reason` and a `remediation` when none is. It only probes; it never starts a daemon. Semantic search needs the daemon (or a remote endpoint) to be running: a backend that is absent is a real `embedding-unavailable` state, not normal. Config lives at `--config`, `AUTORAG_CONFIG`, `$AUTORAG_HOME/config.json`, or `~/.autorag/config.json`. Read `searchPaths`, `workspacePath`, `minSync`, `jikji`, and `datasources` before changing anything. If the CLI itself is missing or the config does not exist, stop and run the `autorag-setup` skill first — doctor repairs an existing install, it does not create one.