Distil banner
munhq munhq

Distil

AI community

Description

Measure what context compression actually costs an LLM agent: where a session's tokens go, and whether a rewrite pays for the prompt cache it invalidates. Rust crate, MCP server and benchmark harness.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

distil

[![npm](https://img.shields.io/npm/v/%40munhq%2Fdistil?label=npm&color=cb3837)](https://www.npmjs.com/package/@munhq/distil) [![MCP Registry](https://img.shields.io/badge/MCP%20Registry-io.github.munhq%2Fdistil-000)](https://registry.modelcontextprotocol.io/v0/servers?search=distil) [![Smithery](https://img.shields.io/badge/Smithery-munhq%2Fdistil-7c3aed)](https://smithery.ai/servers/munhq/distil) [![license](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue)](LICENSE-MIT)

[![Install in Cursor](https://img.shields.io/badge/Install-Cursor-000?logo=cursor)](cursor://anysphere.cursor-deeplink/mcp/install?name=distil&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBtdW5ocS9kaXN0aWwiXX0=) [![Install in VS Code](https://img.shields.io/badge/Install-VS%20Code-007ACC?logo=visualstudiocode)](vscode:mcp/install?%7B%22name%22%3A%22distil%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40munhq%2Fdistil%22%5D%7D)

claude mcp add distil -- npx -y @munhq/distil

No account, no API key, nothing to configure. The package is a small wrapper that fetches the binary for your platform and verifies it against the published checksums; `install.sh` and a prebuilt binary remain for anyone without Node.


Measure what context compression actually costs, on real agent traffic.

Every tool in this space publishes a savings percentage measured on its own fixtures. What none publishes is the denominator: what share of a real session it is allowed to touch, and what that share costs once prompt-cache pricing is applied. `distil` measures both on transcripts an agent actually wrote.

**What is prior art, and what is not.** The cache arithmetic below is not a discovery. Anthropic's [context editing docs](https://platform.claude.com/docs/en/build-with-claude/context-editing) state that clearing tool results invalidates the cached prefix, and ship `clear_at_least` so a clear only fires w