🧠
AI EngineeringRust

LeanCTX

by yvgude

LeanCTX is an AI Engineering skill for Claude Code, published by yvgude in lean-ctx.

3.6K stars324 forkson yvgude/lean-ctxAdded 2026/08/16Repository updated 2026/08/16
agentic-codingaiai-agentsai-codingclaude-codecontext-engineeringcontext-intelligencecontext-layercopilotcursordeveloper-toolsgemini-clilean-contextllmmcpmcp-serverreduce-token-costsrusttoken-optimization
Install in seconds
Install LeanCTX
Copy LeanCTX into your Claude Code skills folder. Run the command in your terminal, or review the source on GitHub before installing.
terminal
npx degit https://github.com/yvgude/lean-ctx/tree/main/skills/lean-ctx ~/.claude/skills/lean-ctx

Requires Node.js. Downloads this skill only — not the rest of the repository — into your Claude Code skills folder.

Without Node.js

git clone https://github.com/yvgude/lean-ctx.git

Clones the whole repository, then copy the skill’s own directory into your skills folder yourself.

In this catalog

Source file
skills/lean-ctx/SKILL.md in yvgude/lean-ctx
Installs to
~/.claude/skills/lean-ctx
Collection
One of 2 skills cataloged from this repository
Category
AI Engineering2451 skills

What LeanCTX does

LeanCTX compresses LLM context by up to 99% using 79 MCP tools, 10 read modes, 95+ shell compression patterns, and tree-sitter AST parsing for 26 languages. Use it when reading files, running shell commands, searching code, or exploring directories.

LeanCTX is cataloged under AI Engineering on DirSkills. LeanCTX comes from a repository tagged agentic-coding, ai, ai-agents, ai-coding and claude-code.

Documentation

README

LeanCTX — Context Engineering for AI Agents

LeanCTX optimizes LLM context through 79 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:

which lean-ctx || bash scripts/install.sh

If the install script is not available locally, install manually:

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):

lean-ctx setup

This is the opening of the README. Read the full README on GitHub.

Frequently asked about LeanCTX

  • What else does yvgude publish alongside LeanCTX?

    LeanCTX is one of 2 skills that DirSkills catalogs from yvgude/lean-ctx, the repository it ships in. Its siblings there include Lean Context. Each one is a separate skill with its own page in this directory, installs the same way LeanCTX does, and is maintained by yvgude in that same repository. The rest of the collection is listed on the yvgude/lean-ctx page.

  • How does LeanCTX compare to other AI Engineering skills?

    LeanCTX ranks #587 by stars among the 2451 AI Engineering skills in this catalog. The most-starred ones next to it are Architecture Decision Records, AI-First Engineering and Agentic OS. DirSkills ranks by the star count of the repository each skill ships in, so that order reflects how popular those repositories are rather than any review of LeanCTX against them. Open each page to compare what they document and how they install.