← all repositories
teamchong/pxpipe

Turn Bulky Prompts Into Cheap Pixel Pages

pxpipe is a local proxy that intercepts Claude Code’s heaviest requests and reflows system prompts, tool docs, and history into dense PNGs, trading expensive text tokens for cheaper vision ones.

6.7k stars TypeScript Coding AssistantsLLMOps · Eval
pxpipe
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does

pxpipe sits between your machine and the API, intercepting the parts of each request that Claude Code resends endlessly—system instructions, tool definitions, and older conversation history. It reflows that text into dense PNG pages and feeds them to the model through the same vision channel used for screenshots. The result is a smaller request payload measured in image tokens, whose cost depends on pixel dimensions rather than character count.

The interesting bit

The trick is pure token economics: dense code and JSON pack roughly three characters into each image token, versus roughly one per text token on Claude Code traffic. The project treats the LLM’s own vision capability as a compression layer, effectively turning a 1-million-token text window into something closer to 5 million characters of readable context.

Key highlights

  • Claims measured savings of roughly 60–70% on typical Claude Code workloads, with per-request accounting logged locally in ~/.pxpipe/events.jsonl.
  • Supports offline export to PNG pages for manual upload into other image-capable clients such as Cursor.
  • Includes a profitability gate that images only when the math actually wins; sparse prose stays text.
  • Quality benchmarks are published by model: claude-fable-5 hits 100/100 on arithmetic and 13/15 on dense hex recall, while other models vary significantly.

Caveats

  • It is intentionally lossy. Byte-exact strings like hex IDs or hashes can silently confabulate in imaged content—claude-fable-5 catches 13/15, but gpt-5.6-sol hits 0/15—so precision-critical data must remain in native text.
  • Savings depend heavily on how much uncached bulk your client resends; the README notes Claude Code’s habit of repeating system prompts and tool docs is what makes the math work.

Verdict

Worth a look if you are burning through context windows or API budgets with repetitive tool-heavy prompts. Skip it if your workload is sparse prose, byte-exact identifiers, or a client that already caches aggressively.

Frequently asked

What is teamchong/pxpipe?
pxpipe is a local proxy that intercepts Claude Code’s heaviest requests and reflows system prompts, tool docs, and history into dense PNGs, trading expensive text tokens for cheaper vision ones.
Is pxpipe open source?
Yes — teamchong/pxpipe is open source, released under the MIT license.
What language is pxpipe written in?
teamchong/pxpipe is primarily written in TypeScript.
How popular is pxpipe?
teamchong/pxpipe has 6.7k stars on GitHub.
Where can I find pxpipe?
teamchong/pxpipe is on GitHub at https://github.com/teamchong/pxpipe.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.