vecgrep CLAUDE.md

vecgrep CLAUDE.md is an instructions file for coding agents from jeffbai996/vecgrep. It costs 1,439 tokens per session, scanned A, original, MIT.

Developer notes for vecgrep, a local-first tool that searches documents by meaning rather than only exact words. It includes the system layout, supported document inputs, search index components, and design rules.

In plain words
What is it for?
Use them when working on document importing, text chunking, embedding providers, local search storage, the API, command-line commands, configuration, or the React web interface.
Why use it?
They help an agent understand where ingestion, search, storage, configuration, command-line code, and the web interface belong before making changes.

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/jeffbai996/vecgrep/claude-md
Clone the repo
git clone --depth 1 https://github.com/jeffbai996/vecgrep

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 vecgrep CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/jeffbai996/vecgrep/claude-md.svg)](https://agentmods.dev/instructions/jeffbai996/vecgrep/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/jeffbai996/vecgrep/claude-md"><img src="https://agentmods.dev/badge/instructions/jeffbai996/vecgrep/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,439 This file is loaded in full into every session.
When invoked 1,439 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.01439 $0.01439
Opus 5 $0.00720 $0.00720
Sonnet 5 $0.00288 $0.00288
Haiku 4.5 $0.00144 $0.00144

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

Security

Grade A, and why

vecgrep 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 3d 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 · 73 lines

How it starts

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

vecgrep — Claude Code working notes

What this is

A local-first semantic search tool. CLI-first, web UI on the side. OSS — no PII, no leaked context, no portfolio data, no internal hostnames in source. Generic-only.

Architecture cheat sheet

vecgrep/backend/
├── main.py              FastAPI app, mounts /api and serves frontend/dist
├── config.py            settings + ~/.vecgrep paths
├── ingestion/
│   ├── adapters/        text, markdown, pdf, url -> str
│   └── chunkers/        SentenceWindowChunker (default), FixedTokenChunker
├── embed/               OllamaBackend (default), OpenAIBackend (fallback)
├── store/               QdrantStore wrapper (embedded mode)
└── api/                 routes: search, corpus, config

vecgrep/cli/             Click commands that hit the local API
vecgrep/frontend/        React + Tailwind, single page, built into dist/

Design rules

  • Flat over nested. No abstract base classes for things with one impl.
  • Adapter and chunker interfaces are the only spots designed for extension — everything else is concrete.
  • Config in one place (backend/config.py), env vars override JSON.
  • ~/.vecgrep/ is the only persistence location. --ephemeral skips it.
  • Qdrant runs in embedded mode (path=...) by default — no server, no Docker. Server mode (qdrant_url) is opt-in for concurrent readers/writers (serve + watch at once). Embedded locks the dir to ONE process; two clients on different backends = silent split-brain (CLI writes embedded while the daemon reads server, or vice-versa). A multi-process deployment MUST pin qdrant_url in ~/.vecgrep/config.json, not just the systemd unit env — env only reaches the units, so a bare CLI invocation falls back to embedded and diverges. vecgrep doctor reconciles registry↔store but only against whichever backend IT resolves, so same rule applies.
  • Errors that the user can fix (Ollama not running, model not pulled) get plain English messages with the exact command to fix.
  • MCP exposes no DIRECT mutation. The stdio MCP server is read-only (search, list_corpora, get_corpus). The HTTP transport adds the propose_* family (propose_write, propose_edit, propose_delete) — but these write/remove nothing: each creates an inert pending proposal that a human turns into a real write/delete via vecgrep confirm (off-protocol). So even over a leaked/unauthed /mcp endpoint an agent can only suggest a change, never land one — and a propose_delete removes a doc + its embeddings only after that human confirm. Direct/immediate index and delete stay on the REST routes, which operators keep behind tailnet / VPN / localhost. The propose corpus set is default-deny (VECGREP_PROPOSE_ALLOWED_CORPORA), so a proposal can't even target a corpus the operator hasn't opened.
    • propose_edit has two modes: full overwrite (content= the whole new body) or surgical patch (old_str= + new_str= — a str-replace of one unique span, so you don't re-send an 8KB doc to fix one line). The patch is a hard error if old_str is missing or appears more than once (add surrounding context to disambiguate); it touches the body only, frontmatter is preserved, and it flows through the identical proposal/confirm/corpus-gate path. Example — fix a date without a regen: propose_edit(doc_id="notes-007", old_str="July 25", new_str="July 17").

Read the full file on GitHub · 73 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. 3d ago First seen · 73 lines · 1,439 tokens per session scan A 90a3c079f8f5

Subscribe to this mod's changes

vecgrep CLAUDE.md is an instructions file published in the GitHub repository jeffbai996/vecgrep (2 stars, last pushed 4d ago), licensed MIT. It adds 1,439 tokens to every session, about $0.0072 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-31.