LeanCTX Context Optimizer

•
2.2k
•

Optimizes AI agent context by compressing shell outputs, file contents, and logs by up to 99% to save tokens and improve reasoning efficiency.

LeanCTX (Lean Cortex) is a sophisticated cognitive context layer designed to maximize the efficiency of agentic systems like Claude Code and Cursor. By utilizing 62 MCP tools and tree-sitter AST parsing for 18 languages, it intelligently strips noise from verbose command outputs—such as build logs, git diffs, and dependency trees—while preserving essential semantic meaning. It features adaptive file reading modes, cross-session memory for persistent state, and a feedback loop that learns optimal compression patterns. This allows developers to work with massive codebases and long-running tasks without hitting context window limits or wasting tokens on non-essential data.

주요 기능

01Cross-session continuity (CCP) for maintaining memory across different chat instances
02Real-time analytics dashboard for monitoring token savings and adoption statistics
03Up to 99% token savings using 60+ specialized shell output compression patterns
04Multi-mode file reading including AST-based API signatures and dependency maps
05Seamless integration via CLI-redirect or MCP for tools like Claude Code and Cursor
062,216 GitHub stars

사용 사례

01Navigating large codebases by reading structural API surfaces rather than full source code
02Compressing verbose build and test outputs from Docker, Cargo, or NPM to focus on errors
03Maintaining architectural decisions and task findings across multiple AI agent sessions