Skip to content
Conduit

skill

ereader-reencode

Re-encode illustrated books so an E Ink reader turns pages without stalling. The bottleneck is decode cost per page, not file size.

romain-nicod/ereader-reencodecommunitylistedunreviewed

Set up

Skills are installed by placing their folder where your agent loads skills.

The download comes from github.com/romain-nicod/ereader-reencode itself, not from our server, so what you get is exactly what its author published.

Install instructions come from the README

Skills do not use an MCP config. Follow the steps in the README below.

README

synced Oct 23, 2026

ereader-reencode

Version française

A Claude skill, and the standalone script behind it, that re-encodes illustrated books so an E Ink reader turns pages without stalling. Comics, manga, children's albums, illustrated documentaries: the books that make a reader think for four seconds before showing you anything.

The thing that is counter-intuitive

The bottleneck is not file size, it is decode cost per page. These two pull in opposite directions, and getting it backwards undoes the whole job.

A source file is small on disk because it pushes the work onto the reader. An Internet Archive scan fits five megapixels into 17 KB, as JPEG 2000, decoded by wavelet transform, with a separate JBIG2 mask to decode and compose on top. The compression is spectacular. The price is paid on every page turn, on a device with a slow processor and no hurry.

So the output of this tool is often larger on disk and three to ten times cheaper to display: baseline JPEG, sized to the panel, one greyscale channel where the book is actually monochrome, no mask.

Which is why the one thing never to do is re-compress the output to make it smaller. That puts the problem back.

Three kinds of book, three treatments

The script decides which is which and prints its verdict before converting, because confusing them breaks books.

VerdictWhat it isWhat happens to it
OKA page-image book: album, comic, mangaRebuilt as a fixed-layout EPUB, one image per page
REFLOWA reflowable EPUB carrying several images per documentStructure preserved, oversized images shrunk only
TEXTEA novel, images under half the fileCopied verbatim, never re-encoded

A novel turned into images loses its text, its search, its dictionary and its font size control, and gains fifty times its weight. If someone insists their novel is slow, the cause is somewhere else: text EPUBs are not what stalls an E Ink reader.

Using the script on its own

It needs Pillow, plus PyMuPDF for PDFs. No ImageMagick, no poppler.

pip install pillow pymupdf
python skills/ereader-reencode/scripts/reencode.py --list-devices
python skills/ereader-reencode/scripts/reencode.py "book.pdf" --device era-color --out reencoded

With metadata, so the device library is readable:

python skills/ereader-reencode/scripts/reencode.py "book.pdf" \
    --device inkpad-color-3 \
    --title "Mon ballon" --author "Mario Ramos"

Device profiles

Three are built in: the PocketBook Era Color, the Vivlio and PocketBook InkPad Color 3, and the monochrome PocketBook Era. Any other panel works through --width and --height.

The profiles carry the panel's native black-and-white resolution, and references/devices.md explains why that figure rather than the colour one, and which specific bug comes from getting it wrong. A page laid out at 1264 × 1430 once displayed a quarter of itself, because the reader was working against the colour surface at half the resolution.

Installing it as a skill

cp -R skills/ereader-reencode ~/.claude/skills/

Then ask Claude to re-encode a book, or say that a book is slow on your reader, and it will work out the rest.

What it cannot do

It cannot fix a bad scan. Crooked pages, missing pages and unreadable text stay exactly as they were.

Licence

CC BY 4.0. Reuse it, adapt it, sell what you build with it. Keep the credit visible, as NOTICE explains.

↑↓ navigate openesc close