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

✍️ OpenClawRadar📅 Published: April 15, 2026🔗 Source
nervx: CLI tool reduces Claude Code token usage by analyzing codebase structure
Ad

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
Ad

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

Ad

👀 See Also

Collection of 177 OpenClaw SOUL.md Templates Organized into 24 Categories
Tools

Collection of 177 OpenClaw SOUL.md Templates Organized into 24 Categories

A developer has compiled 177 ready-to-use SOUL.md templates for OpenClaw agents across 24 categories including Marketing, Development, Business, DevOps, Finance, Creative, Data, Security, Healthcare, Legal, HR, and Education. All templates are MIT licensed and available on GitHub.

OpenClawRadar
OpenClaw PARA Organization Skill Automatically Sorts Files into Projects, Areas, Resources, Archives
Tools

OpenClaw PARA Organization Skill Automatically Sorts Files into Projects, Areas, Resources, Archives

A developer created an OpenClaw skill that enforces the PARA method (Projects, Areas, Resources, Archives) for organizing files, automatically sorting content instead of dumping everything in the root directory.

OpenClawRadar
Interactive Website Simulates Claude Code Project Structure
Tools

Interactive Website Simulates Claude Code Project Structure

A developer built exploreclaudecode.com, a browser-based simulation of a Claude Code project with a functional file tree, configurable files, and terminal panel. The site explains how .claude/ directories, settings files, skills, agents, hooks, and MCP configs work together.

OpenClawRadar
StartClaw: A headless browser automation tool built on ZeroClaw with Claude integration
Tools

StartClaw: A headless browser automation tool built on ZeroClaw with Claude integration

StartClaw is a browser automation tool built on ZeroClaw's Rust base with Composio v3 for integrations, designed to run headless in the cloud without requiring local hardware. It uses Claude exclusively for reliability and includes built-in context compaction that reduces token usage by ~5x.

OpenClawRadar