Skip to content

Blog

Where Your Agent's Tokens Go When It Searches — and How to Spend Fewer

If you are trying to reduce Claude Code token usage, or your context window keeps filling up before the real work starts, look at how the agent searches. A large share of a session goes into finding things: listing folders, grepping, opening files to check whether they are the right ones. This post breaks down where those tokens go, how a metadata-first search tool changes the bill, and when it does not.

Claude Code for Your Thesis: One Index for Papers, LaTeX and Notes

If you write a thesis or a long paper with Claude Code, your material is spread across three places: a folder of PDFs you have read, the LaTeX source of your chapters, and your notes, often in Markdown or an Obsidian vault. You want to ask "where did I discuss this, and which paper said it first?" and have the agent answer from all three. The way to get there is one local index that covers papers, chapters and notes together, searched through an MCP server. This post shows how to set that up with RTFM, and what it does not do.

Claude Code Memory Is Per-Repo. Here's How to Search It Across All Your Projects

Claude Code keeps a memory folder for each project, so a decision you recorded in one repository is invisible from the next. If you have ever typed "search Claude Code memory files" or "Claude Code memory across projects", the short answer is: index every project's memory folder into one local search index, and let the agent query it. This post shows how to do that with two commands, and what it does not cover.

A Zero-Infrastructure Alternative to claude-context: One SQLite File

claude-context is a solid MCP server for semantic code search, but its default setup asks for an OpenAI API key and a Zilliz Cloud account, and its fully local setup means running Milvus in Docker plus Ollama for embeddings. If you want project search for Claude Code without any of that, RTFM is one pip install and one SQLite file, with embeddings optional and running on your CPU. It is not a better semantic code search engine. It's a lighter one that also indexes everything that isn't code.

Your CLAUDE.md Is Too Long: Let the Agent Search Your Docs Instead

Your CLAUDE.md started as ten lines. Now it holds the architecture, the deploy steps, the naming rules, three past incidents and a glossary, and Claude Code still seems to ignore half of it. The fix is not a better-worded instructions file; it is a shorter one, with the rest of your docs made searchable so the agent pulls in the section it needs, when it needs it.

Context7 for Your Own Docs: Indexing Private Documentation Locally

Context7 is great at one thing: giving your coding agent current documentation for public libraries, so it stops inventing APIs that changed two versions ago. But the documents your agent misses most are usually not React's or Django's; they are yours: the internal API spec, the architecture decisions, the PDF from the vendor, the runbook. If you searched for "Context7 for private docs" or "Context7 alternative for internal documentation", this post covers how to get that kind of lookup for your own docs, locally, and when a hosted option is the better choice.

Grep Is Fine for Code. It Struggles with Everything Else in Your Repo

If you have watched Claude Code grep the same folders again and again, you have probably wondered whether a smarter search tool would stop the agent burning tokens exploring your codebase. For code, often it would not: grep is very good at finding identifiers. The cost shows up elsewhere, on the docs, specs, PDFs, decision records and notes that sit next to the code, where there is no exact string to search for.

You Don't Need a Vector Database: Local RAG for Coding Agents with SQLite FTS5

If you want your coding agent to search your project locally, the default advice is "chunk, embed, store in a vector database". For most of what a coding agent asks, you can skip the vector database entirely: SQLite's built-in full-text search (FTS5) with BM25 ranking runs from a single file, needs no model, no server and no API key, and handles the literal-term queries agents send most of the time. Embeddings are worth adding for one specific job, and you can run them locally on a CPU too.

Make Your Obsidian Vault Searchable by Claude Code — No API Key, No Plugin

You have a few hundred (or a few thousand) notes in Obsidian and you want Claude Code to use them: answer from your research notes, follow your [[wikilinks]], stop re-reading the same folders every session. The short answer: run pip install rtfm-ai, then rtfm vault inside the vault. It builds a local search index in one SQLite file, wires it into Claude Code, and needs no API key and no Obsidian plugin.

Search Your Ebook Library from Claude Code (EPUB, MOBI, FB2, DJVU)

You have a few hundred ebooks on disk and you would like to ask Claude Code "which of my books discusses X, and what exactly does it say?" without opening them one by one. The way to do it: build a local full-text index of the books, chapter by chapter, and give Claude Code an MCP server that searches it. This post walks through that with RTFM, for EPUB, MOBI/AZW, FB2, DJVU and PDF.