Analysis updated 2026-05-18
Reduce the token cost of long Claude Code sessions by imaging bulky system prompts and tool docs.
Export code, files, or diffs as dense image pages for pasting into other AI tools that accept images.
Monitor a live dashboard of tokens saved and see each text-to-image conversion side by side.
| teamchong/pxpipe | getagentseal/codeburn | software-mansion/react-native-gesture-handler | |
|---|---|---|---|
| Stars | 6,603 | 6,627 | 6,724 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | easy | easy | moderate |
| Complexity | 4/5 | 2/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Works with a single npx command and one environment variable, savings and reliability vary a lot by model and content type.
pxpipe is a local proxy that sits between Claude Code, a command line coding assistant, and the AI model behind it, with one job: shrink the bill by turning bulky text context into compact images before it gets sent. The idea rests on a quirk of how vision models charge for images: the token cost of an image depends on its pixel size, not on how much text is packed inside it. Dense material like code or JSON fits far more characters per token as an image than as plain text, so rendering the system prompt, tool documentation, and older conversation history as small PNG pages instead of raw text can cut the token bill substantially, roughly sixty to seventy percent at the time this was written. Getting started takes one command to start the proxy and one environment variable to point Claude Code at it, after which a local dashboard shows tokens saved and every text-to-image conversion side by side, along with a kill switch to turn it off. Responses from the model still stream back as normal text, only the request going out gets compressed, and only the bulkier, older parts of it, while recent turns of conversation stay as plain text. There is also an offline mode that renders files or diffs into image pages without running the proxy at all, useful for pasting dense context into other tools that accept image uploads. The project is unusually direct about where this approach falls short. Compression is lossy: exact strings like long hex identifiers or secrets can be misread by the model, especially on models other than the default one, so anything that must be byte-exact is kept as text or routed to a different model entirely. Results also depend heavily on the specific model and the type of content: it saves money on dense, token-heavy content but can actually cost more on sparse prose, so a built-in profitability check decides when to image something at all. Different models get different image rendering profiles tuned to how well each one reads that format.
A local proxy that shrinks Claude Code's token bill by rendering bulky text context, like system prompts and tool docs, as compact images instead.
Mainly TypeScript. The stack also includes TypeScript, Node.js.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.