Related ToolsClaudeClaude CodeCursorCodyAider

Codesight Cuts Claude Token Usage 99% With Pre-Compiled Codebase Wikis

Claude by Anthropic
Image: Anthropic

47,450 tokens down to 360. That's the before-and-after from a developer who got tired of watching Claude re-learn their codebase at the start of every session.

The tool is called codesight, and it works by generating a pre-compiled wiki - a single structured summary document - from your project files. Instead of Claude reading through dozens of source files to understand what your project does, it reads the wiki once and starts working. The command is: npx codesight --wiki.

The inspiration came from Andrej Karpathy, who described his "LLM Knowledge Bases" setup - the idea of pre-digesting project context into a dense reference document rather than feeding raw files to the model each session. Karpathy noted there was "room here for an incredible new product instead of a hacky collection of scripts." Someone built it.

The Token Math

Context window (the total amount of text an AI model can hold in working memory at once) is a real constraint for developers using AI coding assistants. On a 40-file FastAPI project, exploring the codebase cold costs roughly 47,450 tokens per session. At current Claude API pricing, that compounds fast across dozens of daily sessions.

The wiki approach cuts that to 360 tokens - a 99%+ reduction. The tradeoff: the wiki needs to stay in sync as the codebase evolves. For stable projects, or during active development where scope is well-defined, the savings are significant.

This pattern is already common among heavy AI coding users. CLAUDE.md files, project-level system prompts, and Cursor's memory features all follow the same logic: pre-compile what the model needs to know instead of reconstructing it from scratch each time. Codesight automates the generation step that most developers currently do by hand.

Available now via npx with no install required. If you run long Claude Code sessions against the same codebase repeatedly, the numbers make a strong case for trying it.