nervx: CLI tool reduces Claude Code token usage by analyzing codebase structure

What nervx does
nervx is a CLI tool (pip installable) that addresses Claude Code's inefficient codebase navigation. The developer built it after observing Claude would perform excessive grep searches (60+ times for simple queries) and re-read files, consuming half the context window before starting real work.
How it works
The tool parses your entire repository with tree-sitter, builds a SQLite graph of every function, class, call chain, and import, then generates a NERVX.md file containing a structural map of your project. This map includes entry points, execution flows, hot files, and fragile code.
The key feature: running nervx build . automatically adds instructions to your CLAUDE.md file that teach Claude how to use nervx. Claude then runs nervx nav on its own before grepping, checks blast radius before refactoring, and generally navigates more efficiently without manual prompting.
Technical details
- No MCP server configuration required
- No API keys needed
- No LLM calls during build process
- Pure tree-sitter + git implementation
- Builds in under 5 seconds
- Zero LLM cost for the analysis
Performance results
Tested on a FastAPI repository with the same 3 questions:
- Tool calls: 93 → 56 (-40%)
- Output tokens: 15,694 → 8,196 (-48%)
- Grep searches: 63 → 22 (-65%)
Additional features
- Catches dead code
- Flags functions where callers disagree on error handling
- Detects patterns like factories and event buses from graph shape
- Includes visualization for the generated graph
- Supports Python, JS/TS, Java, Go, Rust, C/C++, C#, Ruby
Why it's different
The developer specifically avoided approaches that use LLMs to generate graphs or require MCP setup, focusing instead on pure static analysis to avoid adding more token usage to solve the token waste problem.
📖 Read the full source: r/ClaudeAI
👀 See Also

Context-Engineered Study System for Claude Code Acts as Persistent Tutor
A developer built a study system using Claude Code that tracks progress across sessions, probes understanding, works through exercises, and adapts to learning styles. The system uses structured markdown files to shape agent behavior and includes tools for extracting textbook pages from PDFs.

Ollama Update Adds OpenClaw Support for Kimi k2.5 Cloud Model
Ollama has released an update that integrates OpenClaw support for cloud models, including free access to the Kimi k2.5 model with web search functionality, running on NVIDIA data centers.

HomeButler: MCP Server for Managing Homelab Servers from Claude Without API Keys
HomeButler is an MCP server that lets Claude install, monitor, and manage self-hosted apps on homelab servers without requiring API keys. It runs locally, keeps everything on your network, and was built with Claude Code.

Automating Claude Desktop Release Notes from Minified Electron Apps
A developer created an automated pipeline using Claude Sonnet and Opus 4.6 to generate release notes for Claude Desktop on Linux, addressing the lack of official release notes from Anthropic. The system extracts, normalizes, and analyzes minified Electron app code as part of a CI/CD workflow.