CodeShave deterministically strips execution bodies while preserving 100% syntactically valid classes, methods, docstrings, and type signatures. The universal AST compression tool for Claude, ChatGPT, Cursor, VS Code, and Windsurf.
Universal multi-language AST compression running 100% locally in your browser. No data sent to any server.
Why modern AI coding models generate 10x better code when prompted with CodeShave skeletons.
Strips loops, error handlers, and internal execution blocks to ... or { /* ... */ } while keeping 100% syntactically valid code structures.
Removes thousands of lines of boilerplate. Directs model attention entirely to public interfaces, contracts, schemas, and high-level architectural relationships.
Preserves all class hierarchies, method signatures, return types, decorators, and docstrings. The AI calls real methods instead of guessing parameters.
Compresses a 250,000-token repository into a compact 15,000-token skeleton in ~150ms. Models begin streaming answers in milliseconds, not minutes.
Run codeshave pack ./src --budget 32000 to automatically down-sample and prune code to strictly fit any context window limit without crashes.
1-click command codeshave connect --all automatically binds to Claude Desktop, Claude Code, Cursor, Windsurf, Codex, and Google Antigravity.
Measured token compression ratios across production enterprise microservices and applications.
| Language & Tech Stack | Original Tokens | CodeShave Skeleton | Token Savings | Compression Ratio |
|---|---|---|---|---|
| Python (FastAPI backend + Pydantic models) | 134,069 t | 15,393 t | -118,676 t | -88.5% |
| TypeScript (Next.js 14 full-stack services) | 12,450 t | 2,180 t | -10,270 t | -82.5% |
| Go (Distributed microservice & gRPC API) | 8,920 t | 1,420 t | -7,500 t | -84.1% |
| Rust (Compiler engine & AST syntax parser) | 14,200 t | 2,450 t | -11,750 t | -82.7% |
| Java (Spring Boot enterprise REST API) | 18,300 t | 3,100 t | -15,200 t | -83.1% |
| C++ (High-performance quantitative engine) | 11,500 t | 2,050 t | -9,450 t | -82.2% |
Choose your preferred AI client, IDE, or terminal workflow.
Install directly from the official marketplace or add to .vscode/mcp.json:
💡 Note: After configuring, restart the app or start a new chat session to load the tools.
Everything you need to know about CodeShave and AST token compression.
... or { /* ... */ }). All classes, functions, decorators, type hints, docstrings, and interfaces remain 100% syntactically valid.
io.github.jaideepkrishna2008-ui/codeshave.