lean-ctx

Featured

Context Engineering for AI Agents — 81 MCP tools, 10 read modes, 95+ shell patterns, tree-sitter AST for 26 languages. Compresses LLM context by up to 99%. Use when reading files, running shell commands, searching code, or exploring directories. Auto-installs if not present.

AI & Automation 3,421 stars 311 forks Updated 3 days ago Apache-2.0

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# LeanCTX — Context Engineering for AI Agents LeanCTX optimizes LLM context through 81 MCP tools, 95+ shell compression patterns, and tree-sitter AST parsing for 26 languages. It provides adaptive file reading, cross-session memory (CCP), task-conditioned relevance scoring, and a feedback loop for learning optimal compression. ## Setup (run first) Before using lean-ctx, verify it is installed: ```bash which lean-ctx || bash scripts/install.sh ``` If the install script is not available locally, install manually: ```bash curl -fsSL https://raw.githubusercontent.com/yvgude/lean-ctx/main/skills/lean-ctx/scripts/install.sh | bash ``` After installation, run the one-command setup (installs shell hook + editor wiring + rules + skills): ```bash lean-ctx setup ``` lean-ctx supports two integration styles (auto-detected per agent): - **Hybrid (default where shell access exists)**: MCP for cached reads/search + shell hooks that compress command output. - **MCP (for IDE-extension agents without reliable shell hooks)**: cached reads + all tools via MCP. ## When to use lean-ctx Prefer the current shell's configured compression over nested wrappers. In agent shells, run commands normally unless the user explicitly asks for `lean-ctx -c <command>` or task setup/docs explicitly say the shell is not wrapped. Do not inspect env vars just to decide; users may forbid env access. Use `lean-ctx -c <command>` over running commands directly only when: - The command produces verbose output...

Details

Author
yvgude
Repository
yvgude/lean-ctx
Created
4 months ago
Last Updated
3 days ago
Language
Rust
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category