Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Lean Context

    1

    Cut Claude Code and Cursor token costs by 30-50% with AST-aware context compression, skeleton extraction, and budget guards.

    $12

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    lean-context

    lean-context

    Example session with this skill installed

    I need to understand the structure of the core engine in this repo, but the files are huge. Help me map it out without hitting context limits.

    • Read your context and instructions
    • Compiled the lean-context

    I have scanned the repository and generated a compressed map of the core engine. I filtered out all build artifacts and pruned Python files to their signatures to stay within your token budget. ## Repository Context Summary | File Path | Original (Tokens) | Compressed (Tokens) | % Saved | | :--- | :--- | :--- | :--- | | `engine/core.py` | 1,840 | 420 | 77% | | `engine/utils/math.py` | 950 | 180 | 81% | | `engine/handlers/events.py` | 1,200 | 310 | 74% | | **Total** | **3,990** | **910** | **77%** | ```python # engine/core.py (Compressed AST View) class ExecutionEngine: """Main orchestrator for task execution.""" def __init__(self, config: dict): ... def register_handler(self, name: str, handler: Callable): """Registers a new event handler to the engine.""" ... def run_sync(self, task_id: str) -> Result: """Executes a task synchronously and returns the Result object.""" ... class Result: def __init__(self, status: str, data: Any): ... ``` ```text . └── engine/ ├── __init__.py ├── core.py ├── handlers/ │ ├── __init__.py │ └── events.py └── utils/ ├── __init__.py └── math.py ``` **Next steps** 1. Would you like me to expand the full body of a specific method in `core.py`? 2. I can perform a `lean-context` diff if you have pending changes to these files. 3. Type `show me the structure` at any time to refresh this map.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    The problem Large Python codebases quickly exhaust LLM context windows. Manually stripping boilerplate to save tokens is slow and error-prone. What it does - AST-aware file summaries (signatures only) - Low-token directory tree skeletons - Git diff summarization for code review - 3,000-token HITL budget per cycle - Zero external dependencies (Python 3.8+ stdlib only) Why it beats prompting yourself Generic prompts miss edge cases: large files, nested directories, build artifacts. lean-context ships dedicated scripts with budget enforcement. Use cases - Inspect or refactor a 2,000-line file without blowing context - Map repo structure before deep analysis - Review PR diffs without dumping full files - Stay under token budget on long sessions Limitations v1.0 is Python only. TypeScript support arrives in v1.1.

    Supports Python 3.8+ only. Requires python3 on the system PATH. Does not currently support TypeScript, JavaScript, or other languages.

    How to use

    1. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    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

    Requires

    Python

    Permissions

    Terminal / Shell
    Listed2 months ago
    Updated1 month ago

    What's inside

    Frequently Asked Questions

    This skill uses Abstract Syntax Tree (AST) parsing to strip boilerplate and internal logic, leaving only class/function signatures and structural skeletons. This allows you to feed your LLM the 'blueprint' of your code rather than the full source, significantly reducing token consumption.

    Currently, v1.0 is optimized specifically for Python (3.8+). However, the roadmap includes TypeScript and JavaScript support in the upcoming v1.1 release, which will be available to all current license holders.

    Yes, lean-context is designed to work seamlessly with CLI-based agents like Claude Code and IDE extensions like Cursor. By running the compression scripts before pasting or piping code into your agent, you stay well within context windows.

    The budget guard is a Human-In-The-Loop (HITL) safety feature that prevents accidental token spikes. It enforces a 3,000-token limit per cycle, ensuring your agent doesn't ingest massive amounts of data without your explicit approval.

    You receive the full suite of AST-aware compression scripts, directory skeleton generators, and git diff summarizers. These are standalone tools with zero external dependencies, making them easy to drop into any Python project.

    New in Agents & Orchestration