doctor

doctor is a command for coding agents from geckse/markdown-vdb. It costs 15 tokens per session (1,843 once invoked), scanned A, original, MIT.

A read-only health-check command for an mdvdb project. It checks configuration, connections to the service that creates search embeddings, the index, source files, links, shards, and topics.

In plain words
What is it for?
Use it to investigate missing configuration, API-key or provider connectivity issues, damaged indexes, undiscovered files, broken relations, and shard or topic problems.
Why use it?
It gathers common setup and data problems into one diagnostic result without changing the project.

Command

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.

agentmods
npx agentmods add commands/geckse/markdown-vdb/doctor
Clone the repo
git clone --depth 1 https://github.com/geckse/markdown-vdb

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/geckse/markdown-vdb/doctor.svg)](https://agentmods.dev/commands/geckse/markdown-vdb/doctor)
Your own site
<a href="https://agentmods.dev/commands/geckse/markdown-vdb/doctor"><img src="https://agentmods.dev/badge/commands/geckse/markdown-vdb/doctor.svg" alt="Measured on agentmods" 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 1,843 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00015 $0.01843
Opus 5 $0.00008 $0.00922
Sonnet 5 $0.00003 $0.00369
Haiku 4.5 $0.00002 $0.00184

Measured 4d ago against content hash d0974fb35ca8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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.

docs/cli/commands/doctor.md · 185 lines

How it starts

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

mdvdb doctor

Run a read-only health check for the current project. doctor reports configuration discovery, embedding connectivity, index integrity, source discovery, frontmatter Relations, and Shard/Topic configuration in one result.

Usage

mdvdb doctor [OPTIONS]

Options

This command has no command-specific options. It accepts the global options, including --root, --json, --verbose, and --no-color.

Diagnostic checks

A successful diagnostic run returns nine checks in this order:

# Check What it validates
1 Config loaded Shows the resolved embedding provider, model, and dimensions. The command has already loaded configuration when this check is emitted.
2 User config Looks for ~/.mdvdb/config.yaml, or config.yaml below MDVDB_CONFIG_HOME. A missing user config is a warning because it is optional.
3 Project config Checks that the project has a .markdownvdb/ directory.
4 API key Explicitly validates OPENAI_API_KEY for the OpenAI provider. Mock needs no key; other providers are reported as configured and are actually exercised by the connectivity check.
5 Provider reachable Sends one test embedding request with a five-second timeout. Authentication, endpoint, model, and network failures surface here.
6 Index Reports documents, chunks, edge vectors, and vectors. A healthy index has vectors = chunks + edges. An empty or mismatched index warns.
7 Source directories Discovers Markdown in the configured source directories and reports the file count.
8 Relations Warns about dangling frontmatter Relation targets, schema target folders with no indexed files, and unquoted [[wikilink]] values that YAML parsed as nested lists.
9 Shards Validates Shard definitions, target folders, and local Topic definitions. Missing or malformed configuration warns.

Each check is Pass, Warn, or Fail. Warnings describe repairable or optional conditions; failures normally prevent an operation such as source discovery or provider access from working.

Read the full file on GitHub · 185 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. 4d ago First seen · 185 lines · 15 tokens per session scan A d0974fb35ca8

Subscribe to this mod's changes

doctor is a command published in the GitHub repository geckse/markdown-vdb (23 stars, last pushed 20d ago), licensed MIT. It adds 15 tokens to every session and 1,843 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-30.