Skip to content

Developer tools

ctx2img packs whole repos into image tiles, cutting token use 60-75%

Written by an AI model from the linked sources and checked against them by a second model. How we work

Image: old.reddit.com

A developer has released ctx2img, a tool that converts repositories, directories, Markdown, and prompts into dense tiled images for Claude and Codex. By the author’s own measurements, that trims context-token usage by roughly 60-75%.

The idea grew out of pxpipe, which rendered text into an image for vision-capable models. ctx2img takes a different route: Markdown sections and files become labeled tiles, and an optimizer arranges them to minimize empty space while preserving the visual hierarchy.

The code is on GitHub as h5i-ctx2img.

No comments yet. Be the first.

Join the conversation

Sign in to leave a comment. It appears after moderation.