deniz.in

Markets

Weather

Loading weather

· via Hacker News – Front Page (hnrss.org)

Claude Code skill recovers Kindle highlights blocked by Amazon export limits

A published Claude Code plugin extracts every highlight from your own Kindle account, including text Amazon's notebook export truncates or hides, by pairing browser control with local OCR.

Claude Code skill recovers Kindle highlights blocked by Amazon export limits

What was released

A developer publishing as l3a0 has put out a Claude Code plugin that produces a complete, verbatim export of a reader's Kindle highlights — including the passages Amazon's own export tool clips mid-sentence or refuses to return at all. The project lives on GitHub under l3a0/claude-plugins, which doubles as both the plugin and its own marketplace, and it drew wider attention after reaching Hacker News's front page.

The problem it targets will be familiar to heavy annotators. Export a densely highlighted book from Amazon's Kindle notebook page and some highlights come back incomplete while others return nothing but a location number, next to a notice that some highlights were hidden or shortened because of export limits. According to the repository's README, those limits stem from a quota Amazon neither documents nor lets users raise, even though the notes are the reader's own work stored in the reader's own account.

How the recovery works

The skill, called kindle-highlights, combines three data sources. First, it scrapes the notebook page's DOM for everything the web export does show, preserving the original typography. Second, it reads character-precise highlight positions from a SQLite database that the current Mac Kindle app syncs locally — a source the README says carries no export limit and covers even highlights the web page hides completely. Third, for blocked passages it captures the Cloud Reader's rendered pages through a canvas, without operating-system screenshots, runs them through Apple's Vision OCR framework locally so no model tokens are spent, and trims the recognized text to the exact extents learned from the app's database.

The end product is a single Markdown file organized into per-location sections with the highlight text quoted verbatim, markers flagging anything recovered or approximate, and a quality-check pass at the end.

What it takes to run

The pipeline is macOS-only by design in three separate places: browser control runs through AppleScript, OCR uses Apple's Vision framework, and highlight extents come from the Mac Kindle app's local files. Prerequisites include Claude Desktop with the Control Chrome extension (Anthropic's browser-control MCP), Chrome signed into the Amazon account with JavaScript-from-Apple-Events enabled, the current Mac Kindle app (bundle id com.amazon.Lassen, not the older Kindle.app) with the book downloaded, Xcode's command line tools to compile a small Swift OCR helper, and python3 to assemble the output and run a localhost receiver on port 8931.

Installation is two commands, after which skills are invoked as slash commands or auto-triggered when a request matches a skill's description. The author reports validation across four real books: 2,432 highlights extracted, of which 815 were export-blocked — 454 truncated and 361 fully hidden — with all of them recovered and recovered text landing within a character or two of the Kindle app's own position ruler. Those figures are the author's own and not independently verified. A longer write-up covering why the export limit exists and how it was defeated appears on the author's Substack.

The README is explicit about scope: the tool exports your own highlights from your own account, and because book text is copyrighted, the output is meant to stay private.

Why it matters

Two things make this more than a scraping script. As a demonstration of Claude Code's skill format, it packages a genuinely multi-step pipeline — MCP-driven browser control, local database parsing, on-the-fly Swift compilation, OCR and text assembly — into something installable in two commands and invokable in plain language. That is the pattern agent skills are meant to enable: reusable, distributable automation rather than one-off prompts. And as a data-ownership story, it is a concrete reminder that even notes you wrote yourself can sit behind undocumented limits, and that the client apps on your own machine often hold the complete data a web interface withholds.

  • #claude-code
  • #kindle
  • #amazon
  • #ocr
  • #automation
  • #ai-agents

Related posts