build

build is a command for Claude Code from edochi/mdvs. It costs 0 tokens per session (2,314 once invoked), scanned A, original, MIT.

A command that validates configuration and builds the search index used by mdvs. The index supports semantic search, full-text search, and combined search over Markdown content.

In plain words
What is it for?
Use it to create or update the .mdvs search index, change embedding or chunking settings with confirmation, and run deterministic builds without automatic updates.
Why use it?
It prepares searchable project documentation while checking the configuration and schema needed for the index.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Good fit Use it to create or update the .mdvs search index, change embedding or chunking settings with confirmation, and run deterministic builds without automatic updates.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/edochi/mdvs/build
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/edochi/mdvs

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 build

README.md
[![agentmods](https://agentmods.dev/badge/commands/edochi/mdvs/build/github.svg)](https://agentmods.dev/commands/edochi/mdvs/build)
Your own site
<a href="https://agentmods.dev/commands/edochi/mdvs/build"><img src="https://agentmods.dev/badge/commands/edochi/mdvs/build/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 build

Your own site · 80×15
<a href="https://agentmods.dev/commands/edochi/mdvs/build"><img src="https://agentmods.dev/badge/commands/edochi/mdvs/build.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,314 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.00000 $0.02314
Opus 5.5 $0.00000 $0.00926
Sonnet 5.5 $0.00000 $0.00463
Haiku 4.5 $0.00000 $0.00231

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

Security

Grade A, and why

build 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.

book/src/commands/build.md · 225 lines

How it starts

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

build

Validate, embed, and write the search index.

Usage

mdvs build [path] [flags]

Flags

Flag Default Description
path . Directory containing mdvs.toml
--set-model Change embedding model (requires --force)
--set-revision Pin model to a specific HuggingFace revision (requires --force)
--set-chunk-size Change max chunk size in characters (requires --force)
--force Confirm config changes or trigger a full rebuild
--no-update Skip auto-update before building

Global flags (-o, -v, --logs) are described in Configuration.

What it does

build creates (or updates) the search index in .mdvs/. The pipeline:

  1. Read config — parse mdvs.toml. If [embedding_model], [chunking], or [search] sections are missing, they're added with defaults and written back.

By default, build auto-updates the schema before building (see [build].auto_update). Use --no-update to validate against the committed schema (deterministic CI). The auto chain is cheap on unchanged corpora — no model load, no Lance write.

  1. Scan — walk the directory and extract frontmatter.
  2. Validate — check frontmatter against the schema (same as check). If violations are found, the build aborts.
  3. Classify — compare scanned files against the existing index to determine what needs embedding, what to retain, and what to drop.
  4. Load model — download or load the cached embedding model. Skipped if nothing needs embedding.
  5. Embed — chunk and embed new/edited files.
  6. Write index — branches on the change set: skip (nothing changed and not a full rebuild), full overwrite (first build or --force), or incremental (delete the rows for new/edited/removed files, append the new chunks, refresh metadata, optimize). The Lance dataset is always at .mdvs/index.lance/ with one row per chunk; a full-text BM25 index on chunk_text is rebuilt with the table; a cosine IVF-PQ vector index on embedding is created only above 10,000 chunks (smaller vaults rely on LanceDB's exact flat scan).

Read the full file on GitHub · 225 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. 10d ago First seen · 225 lines · 0 tokens per session scan A 9b2b0df91ca4

Subscribe to this mod's changes

build is a command published in the GitHub repository edochi/mdvs (27 stars, last pushed 11d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,314 tokens. 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-10-05.