- Home
- Skills
- Agents & Orchestration
- lean-context
Works with the AI Agents you already use
Lean Context
Shrink large code files so your AI agent can read them faster and cheaper without losing the important details.
$12
What it does
- Shrinks large Python and TypeScript files by removing code bodies while keeping names and signatures
- Generates a slim directory tree that ignores useless folders like build artifacts and caches
- Summarizes code changes in a repository so you can review updates without reading full files
- Enforces a strict budget to prevent your AI agent from spending too much on a single task
- Triggers a warning if a file is still too large even after it has been compressed
Who it's for
Founders building with AI agents
Keep your AI sessions running longer without hitting memory limits or high costs.
Try asking: “Analyze my project folder and show me the structure without using too many tokens.”
Freelance developers and coders
Review large files and complex codebases without drowning your AI in unnecessary details.
Try asking: “Summarize the functions in this 2,000 line Python file.”
Product managers reviewing code changes
Get a clear view of what changed in a project without reading every line of code.
Try asking: “Show me a lean summary of the latest git changes.”
lean-context
Example session with this skill installed
I need to understand how this project is laid out, but it is a huge repo. Can you show me the structure using lean context?
- Read your context and instructions
- Compiled the lean-context
I will map out your project structure while keeping the token usage low. I am running the directory skeleton generator now.
Here is the slimmed-down view of your project:
.
├── scripts/
│ └── prune_context.py
├── tests/
│ └── fixtures/
├── CHANGELOG.md
├── LICENSE.md
├── README.md
└── SKILL.md
I have ignored folders like node_modules and __pycache__ to save space.
==================================================
TOKEN EFFICIENCY SUMMARY (lean-context v1.2.0)
Original Context : ~1,200 tokens (4,800 chars)
Compressed Context: ~150 tokens (600 chars)
Total Reduction : 87% saved
The structure is now in my memory. Which of these files or folders would you like me to explain or prune for a deeper look?
Connects securely to your tools. The creator never sees your data.
About this skill
When you ask your AI agent to look at a large folder of code, it often gets overwhelmed. It reads too much, forgets earlier instructions, or costs a lot of money because the files are too long. This skill solves that by shrinking what the AI sees. It strips out the "meat" of the code while keeping the "bones" like names and headers. This way, your AI understands the whole project structure without reading every single line.
How it works
- Ask your AI agent to inspect a folder or a specific long file.
- The skill automatically removes bulky parts of the code while keeping the important labels and signatures.
- It checks if the result is still too big and asks you before spending too many tokens.
- Your AI agent gives you a summary or a map of the code that is easy to work with.
What you get: A compressed version of your codebase that fits perfectly into your AI agent's memory.
Supports Python 3.8+ only. Requires python3 on the system PATH. Does not currently support TypeScript, JavaScript, or other languages.
Uses a Python-based AST parser for .py files and a lexer with brace-matching for TS/JS files. It includes a 3,000 token hard budget guard and a Human-in-the-Loop (HITL) trigger. Runs locally via a sidecar script (prune_context.py) with no external API dependencies. Compatible with Claude Code, Cursor, and other agents that support SKILL.md.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 1 month ago
- Software
Python
Permissions
What's inside
Frequently Asked Questions
New in Agents & Orchestration
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.