#119119th of 149 in Skills, plugins and rules

lean-ctx

Local MCP server and shell hook that trim context fed to coding agents

Stars
3.9k
License
Apache-2.0
Last commit
Oct 2026
Last release
Oct 2026
Language
Rust

Missed the latest GitHub check; these facts may be older.

Overview

LeanCTX sits between AI coding tools and the files and command output they read. It exposes ctx_* MCP tools with 16 file read modes, compresses shell output with 85+ patterns, and keeps local session memory, with an optional proxy for model requests. It is written in Rust and set up per agent with `lean-ctx wrap cursor|claude|codex`.

Who it is for: Developers using Claude Code, Cursor or Codex who want fewer tokens per task

Strengths

  • 16 read modes incl. map, signatures, diff, line ranges; cached re-reads return compact references
  • Tree-sitter parsing for 27 languages and 85+ shell-output compression patterns
  • Local savings ledger and dashboard; shadow mode estimates savings against an uncompressed baseline
  • Install via curl, brew, npm or cargo; wrap and unwrap are reversible

Weaknesses

  • Mixed license; enterprise controls and SDK fall under separate terms
  • Shadow Mode savings are simulated, not measured against a second run
  • Claude Pro/Max OAuth cannot use the proxy; wire-level compression needs an API key
  • Addons, snapshots, packages and multi-agent handoff are labeled experimental

What it needs

  • no GPU
  • Models: Claude Code, Cursor, Codex, Anthropic API (proxy)

Also in Skills, plugins and rules

See all 149
Also in Skills, plugins and rules
RankProjectScore
1cavemanCuts token use in coding agents with terse replies and compressed inputs Live demo ↗ (opens in a new tab)112.2k starsApache-2.095 out of 100
2skillsAgent skills for planning, TDD, debugging and code review292.4k starsMIT94 out of 100
3eccAgents, skills, hooks and rules bundle for Claude Code, Codex and other harnesses280k starsMIT94 out of 100
#4impeccableDesign skill with 24 commands and a detector for AI-generated frontends Live demo ↗ (opens in a new tab)81.5k starsApache-2.094 out of 100
#5ponytailSkill prompt that makes coding agents write less code and add tests164.1k starsMIT92 out of 100