/basemind:basemind-doctorfrom basemind
Diagnoses and recovers basemind when MCP tools are missing, the index is empty, or the MCP server appears dead. Runs CLI checks without requiring the MCP server.
Ships in basemind. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use this when basemind isn't behaving: MCP tools aren't available or return errors, the
statusline says no index, queries come back empty when they shouldn't, or the basemind serve
MCP server appears dead. Every step here uses the CLI, so it works even when the MCP server is
down.
Important: a stdio MCP server (what basemind serve is) cannot be restarted by an agent or by
basemind itself — a fresh process can't resume the client's MCP initialize handshake.
Reconnecting the server is the MCP client's job (see step 4). What you can do from here is
make sure the index is healthy and clear anything blocking a restart.
Run the basemind … commands below through the plugin-managed, version-matched binary,
${CLAUDE_PLUGIN_ROOT}/scripts/mcp-launch.sh <args> (in other hosts, scripts/mcp-launch.sh in the
plugin directory); use bare basemind from PATH only when no plugin launcher exists.
basemind doctor # root, config, index, grammars, hook, daemon; exits 1 when a check fails
basemind status
file_count: 0 with blobs present → the index is missing or lost. Build
it: basemind scan (see the basemind-scan skill / /bm-scan).file_count → the index is fine; the problem is the server connection (step 4).code_outline says a README, JSON, YAML or TOML file "is a document, not code" → expected, not a
fault. Find exact text in it with code_grep {"pattern":"…"}, a topic with
docs_search {"query":"…"}.isError names its own fix: follow it (index_rescan, find_files, the
missing Cargo feature) before diagnosing further.notice of warming_up / building_index means the index is still loading: wait and retry
(index_status {} reports the scan state, plus cache_dir, this workspace's cache directory,
and grammar_dir, the tree-sitter grammar cache).With a basemind daemon running, a working-tree basemind scan is forwarded to it (scan via daemon). A forwarded scan can still fail: exit 2 for a flag the daemon cannot apply, 3 while the
daemon is stopping, 1 when the scan itself fails. basemind scan --staged and basemind scan --rev
are not forwarded: while the daemon holds the index they exit 3 with an error naming the daemon's
pid and saying it scans the working tree only. Stop it with basemind comms stop, then rerun the
scan.
Otherwise a lock error (exit 3) means another process (basemind watch, another scan) holds the
index for this repo. The error names the live holder (command + pid) when the .lock.meta sidecar
next to the workspace .lock records it; without that record the error is generic and names
neither. Both files live in this workspace's directory under the machine-global cache (Linux
~/.local/share/basemind/, macOS ~/Library/Application Support/basemind/; override
BASEMIND_DATA_HOME), keyed by workspace — not in the repo.
pid is alive (ps -p <pid>) and is a basemind serve, use the MCP tools if this
session has them attached (if not, reconnect the client: step 4); it keeps the index fresh as you
edit. For a file a result calls stale, run index_rescan {"paths":["src/store.rs"]} or
basemind rescan src/store.rs; for an empty, degraded or rescan_needed index, or changed
files under an extra scan root, index_rescan {}. If the session cannot call the tools, stop that
basemind serve, run basemind scan, then reconnect.basemind watch, there is no MCP server to take an index_rescan, and
basemind rescan exits 3 on the lock. The watcher re-indexes edits itself; to rescan or rebuild,
stop it, run basemind rescan src/store.rs (or basemind scan), then restart basemind watch.code_refs, the keyword lane of
code_search) answer with a busy error, and basemind rescan exits 3 the same way. Starting the
daemon with basemind comms start does not serve this workspace while the holder keeps the index,
so stop the holder, then retry the tool; retry the rescan once the holder has finished or stopped.pid to check: rerun the same command. The OS
releases the lock when its holder exits, so a second exit 3 means a live process still holds it;
wait for it to finish, or stop the basemind process you started for this repo, then retry.pid is dead, the lock is stale. The OS releases the advisory lock when a process
dies, so a fresh basemind scan / basemind serve should just work — retry it. (You may delete
the stale .lock.meta sidecar in that workspace cache dir to clear the advisory holder record.)basemind scan
Non-extractable files are skipped, not failed. After this, both the CLI and (once reconnected) the MCP tools have a fresh index.
basemind can't relaunch its own stdio server; trigger a reconnect in your client:
While disconnected, you are not blocked: use the basemind-cli skill (basemind code …,
basemind git …) — it reads the same machine-global cache directly, no server required.
basemind serve logs its lifecycle to stderr (captured in your client's MCP server logs):
a MCP server starting line with pid/version/view at startup, and an explicit
client disconnected, exiting (clean) or exiting on error (with the cause) at shutdown. If serve
keeps dying, that log line names the reason.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
basemind, mcp-troubleshooting, index-recovery, cli-diagnostics
npx claudepluginhub goldziher/basemind --plugin basemind10 skills in this plugin
/basemindNavigate large or unfamiliar codebases via the basemind MCP server — outlines, symbol search, reference/caller lookups, commit history, blame, and diffs without reading source files. Reach for it whenever the user asks "where is X defined", "what calls Y", "what changed recently in Z", or whenever you're about to grep or open many files to find structural information./basemind-cliNavigate codebases and manage caches via the basemind CLI — outlines, symbol search, reference/caller lookups, git history, blame, and diffs. For headless scripting, CI, or when driving the CLI more efficiently than interactive MCP calls. Shares the same index as the MCP server./basemind-code-searchFind where code is defined and used without reading files — symbol search, file outlines, references, callers, implementations, dependents, and indexed regex over content. Reach for it whenever the user asks "where is X defined", "what calls Y", "what implements Z", "what's the shape of this file", or whenever you're about to grep or open files to learn structure./basemind-commsCoordinate with other agents working the same repo through basemind's agent_post, agent_inbox and agent_threads tools — threads, a per-actor read position, bodies inline. Reach for it whenever you start, finish, or hit a decision while collaborating, or to check whether another agent is already touching the code you're about to change./basemind-documentsSemantic search over documents via basemind's RAG store — PDFs, Office, HTML, email, Jupyter notebooks, and images (OCR), with cross-encoder reranking, keyword and named-entity (NER) filters, and per-document summaries. Reach for it whenever the user asks to "search the docs / PDFs", "find where a topic is discussed", or "what does the documentation say about X"./basemind-git-historyExplore git history without shelling out to git — recent commits, commits touching a path, per-line and per-symbol blame, structural diffs across revisions, churn ranking, and a symbol's history over time. Reach for it whenever the user asks "what changed recently", "who last touched this", "when did this symbol change", "what's the diff between these revs", or "where's the churn".Other plugins' skills for the same job