markdown-vdb CLAUDE.md

markdown-vdb CLAUDE.md is an instructions file for coding agents from geckse/markdown-vdb. It costs 5,817 tokens per session, scanned A, original, MIT.

Repository instructions for a local vector database that stores Markdown files and searches their meaning without requiring separate infrastructure.

In plain words
What is it for?
Use them when changing Markdown ingestion, search, metadata, embeddings, clustering, file watching, the CLI, or Rust tests.
Why use it?
They describe the database’s search, indexing, embeddings, clustering, and file-watching design so changes fit the existing system.

Instructions file

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 instructions/geckse/markdown-vdb/claude-md
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 markdown-vdb CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/geckse/markdown-vdb/claude-md.svg)](https://agentmods.dev/instructions/geckse/markdown-vdb/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/geckse/markdown-vdb/claude-md"><img src="https://agentmods.dev/badge/instructions/geckse/markdown-vdb/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 5,817 This file is loaded in full into every session.
When invoked 5,817 The same file — it is already loaded in full.
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.05817 $0.05817
Opus 5 $0.02908 $0.02908
Sonnet 5 $0.01163 $0.01163
Haiku 4.5 $0.00582 $0.00582

Measured 4d ago against content hash e1d524f9b5a9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

markdown-vdb CLAUDE.md 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.

CLAUDE.md · 272 lines

How it starts

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

Markdown VDB

A filesystem-native vector database built around Markdown files. Rust, zero infrastructure, optimized for AI agents.

All 18 implementation phases plus graph-enhanced search, the Leiden/topics clustering rework, and frontmatter relations (phase 31) are complete and passing (1032 tests, clippy clean).

Architecture

┌─────────────────────────────────────────────────────────┐
│                    Agent Interface                       │
│              CLI (clap) + Library API                    │
│         mdvdb search | ingest | status | watch          │
├──────────┬──────────┬───────────┬───────────────────────┤
│  Search  │  Schema  │ Clustering│   File Watcher        │
│  Engine  │  System  │  (linfa)  │   (notify)            │
├──────────┴──────────┴───────────┴───────────────────────┤
│                   Index Storage                         │
│        usearch (HNSW) + rkyv (metadata) + memmap2       │
│          parking_lot::RwLock (concurrency)               │
├──────────┬──────────────────────────────────────────────┤
│ Embedding│   OpenAI | Ollama | Custom (reqwest)         │
│ Providers│   Batch processing + content-hash skip       │
├──────────┴──────────────────────────────────────────────┤
│                  Chunking Engine                        │
│      Heading-split + token size guard (tiktoken-rs)     │
├─────────────────────────────────────────────────────────┤
│              Markdown Parsing & Discovery                │
│    pulldown-cmark + serde_yml + ignore + sha2           │
├─────────────────────────────────────────────────────────┤
│               Foundation & Configuration                │
│      serde_yml + dotenvy + thiserror + anyhow + tracing │
└─────────────────────────────────────────────────────────┘

Project Structure

src/
├── main.rs              # CLI entry point (clap + anyhow)
├── lib.rs               # Public library API (MarkdownVdb)
├── config.rs            # Config loading: shell env MDVDB_* → project YAML → .env secrets → user YAML → defaults
├── format.rs            # Human-readable output formatting (colors, bars, timestamps)
├── error.rs             # Error enum (thiserror)
├── logging.rs           # Tracing subscriber setup
├── discovery.rs         # File scanning with ignore patterns (.gitignore + .mdvdbignore)
├── parser.rs            # Markdown parsing: frontmatter, headings, body
├── chunker.rs           # Heading-based chunking + token size guard
├── search.rs            # Query pipeline, metadata filtering, time decay, graph expansion, results
├── fts.rs               # Full-text search (Tantivy BM25 wrapper)
├── links.rs             # Link graph extraction, backlinks, orphan detection, multi-hop BFS, neighborhood
├── relations.rs         # Frontmatter relations: link-shape predicate, 3-step target resolution, RelationValue/ReferencedBy
├── tree.rs              # File tree with sync status indicators
├── schema.rs            # Auto-infer + overlay schema system
├── clustering/
│   ├── mod.rs           # Cluster types, Clusterer facade, stability matching, topics (multi-label)
│   ├── leiden.rs        # Cosine k-NN graph + seeded Leiden community detection + hierarchy
│   ├── kmeans.rs        # Seeded K-means fallback (also backs edge clustering)
│   └── labels.rs        # TF-IDF keywords (unigrams+bigrams, smoothed IDF), label generation
├── watcher.rs           # Filesystem watcher (notify + debouncer)
├── ingest.rs            # Full + incremental ingestion pipeline
├── embedding/
│   ├── mod.rs           # EmbeddingProvider trait + factory
│   ├── provider.rs      # Trait definition
│   ├── openai.rs        # OpenAI-compatible provider
│   ├── ollama.rs        # Ollama provider
│   ├── batch.rs         # Concurrent batch orchestration (up to 4) + hash skip
│   └── mock.rs          # Mock provider for testing
└── index/
    ├── mod.rs           # Index public API
    ├── types.rs         # StoredChunk, StoredFile, IndexMetadata (rkyv)
    ├── storage.rs       # File I/O: header + rkyv region + usearch region
    └── state.rs         # Runtime operations with RwLock concurrency

tests/
├── api_test.rs          # Library API integration tests
├── cli_test.rs          # CLI binary integration tests
├── chunker_test.rs      # Chunking pipeline tests
├── clustering_test.rs   # Leiden/K-means + topics clustering tests
├── config_test.rs       # Configuration loading tests
├── discovery_test.rs    # File discovery tests
├── embedding_test.rs    # Embedding provider tests
├── fts_test.rs          # Full-text search (Tantivy BM25) tests
├── graph_test.rs        # Graph traversal + multi-hop search tests
├── index_test.rs        # Index storage + mtime tests
├── ingest_test.rs       # Ingestion pipeline tests
├── links_test.rs        # Link graph + backlinks tests
├── parser_test.rs       # Markdown parsing tests
├── relations_test.rs    # Frontmatter relations (populate, graph edges, filters, doctor) tests
├── schema_test.rs       # Schema inference tests
├── search_test.rs       # Search engine + time decay tests
├── tree_test.rs         # File tree tests
└── watcher_test.rs      # File watcher tests

docs/prds/               # PRD specifications for all 18 phases (reference)

Read the full file on GitHub · 272 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 · 272 lines · 5,817 tokens per session scan A e1d524f9b5a9

Subscribe to this mod's changes

markdown-vdb CLAUDE.md is an instructions file published in the GitHub repository geckse/markdown-vdb (23 stars, last pushed 20d ago), licensed MIT. It adds 5,817 tokens to every session, about $0.0291 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.

Related

Other instructions, from other repositories

readwise-vector-db CLAUDE.md

Instructions for leonardsellem/readwise-vector-db, covering claude.md, essential commands, development workflow, setup and installation and core development commands.

leonardsellem/readwise-vector-db · 2,018 tokens

redis-vl-python CLAUDE.md

Claude Code instructions for redis/redis-vl-python, covering claude.md - redisvl project context, frequently used commands, development workflow, redis setup and documentation.

redis/redis-vl-python · 1,033 tokens

RAGLight CLAUDE.md

Instructions for Bessouat40/RAGLight, covering claude.md, commands, install dependencies, run all tests and run a single test module.

Bessouat40/RAGLight · 983 tokens

reflect-open CLAUDE.md

Claude Code instructions for team-reflect/reflect-open: See AGENTS.md for the full project overview, tech stack, database tables, code conventions, and development cycle.

team-reflect/reflect-open · 62 tokens

pgContext AGENTS.md

Instructions for Evokoa/pgContext, covering agents.md — installing & using pgcontext with an ai agent, what pgcontext is (and why it's worth using), environment facts (pins — do not guess), path a — docker (preferred; zero build, most deterministic) and path b — build from source (when docker is unavailable).

Evokoa/pgContext · 1,455 tokens

flock copilot-instructions.md

Instructions for dais-polymtl/flock, covering copilot instructions for flock, repository layout, building, setup vcpkg (first time or after clean) and release build.

dais-polymtl/flock · 1,406 tokens