메뉴
HN
Hacker News • 32일 전

킨들 하이라이트 내보내기 제한을 복구해주는 Claude Code 스킬

IMP
4/10
핵심 요약

개발자 l3a0이 Amazon이 문서화하지 않은 내보내기 제한으로 잘리거나 숨겨진 자신의 킨들 하이라이트를 전부 복구하는 Claude Code 스킬을 공개했습니다. Mac 킨들 앱의 SQLite 주석 데이터베이스와 Cloud Reader 렌더링 페이지 캡처, Apple Vision OCR을 조합해 차단된 하이라이트까지 원문 그대로 위치 기반 인용과 함께 Markdown 파일로 추출합니다. 4권의 실제 도서에서 815개의 차단된 하이라이트(454개 잘림 + 361개 완전 숨김)를 모두 복구하는 성과를 검증받았습니다.

번역된 본문

l3a0의 Claude Code 플러그인 — 개인적으로 만든 Claude Code 스킬 모음으로, l3a0 네임스페이스 아래 단일 플러그인으로 공개되어 있습니다. 이 저장소는 플러그인인 동시에 자체 마켓플레이스 역할을 합니다. 이 도구들이 어떻게 만들어졌는지, 그리고 기술·비즈니스·금융에 대한 글은 baowebdev.substack.com에서 연재하고 있습니다.

설치: claude plugin marketplace add l3a0/claude-plugins claude plugin install l3a0@l3a0

스킬은 /l3a0:<스킬명>으로 호출되며(다른 설치된 명령이 해당 이름을 사용하지 않는다면 /<스킬명>만으로도 동작), 요청이 스킬 설명과 일치하면 Claude가 자동으로 호출합니다.

스킬: kindle-highlights

하이라이트를 많이 남긴 책을 Amazon 노트북 페이지에서 내보내면 일부 하이라이트는 문장 중간에 잘려서 나오고, 다른 일부는 텍스트 없이 위치 번호만 남은 채 다음 안내 문구와 함께 반환됩니다: "일부 하이라이트는 내보내기 제한으로 숨겨지거나 잘렸습니다." 이것은 여러분 자신의 계정에 있는 여러분 자신의 메모인데, Amazon이 문서화하지도 않고 올릴 수도 없는 할당량으로 제한되고 있는 것입니다.

이 스킬은 그것을 되찾아줍니다. 킨들 노트북(read.amazon.com/notebook)에서 한 권의 모든 하이라이트를 하나의 통합된, 원문 그대로의, 위치 인용이 포함된 Markdown 파일로 추출합니다 — 내보내기 제한으로 잘리거나 완전히 숨겨진 하이라이트까지 포함하여, 이는 Mac 킨들 앱의 동기화된 주석 위치 데이터와 Cloud Reader의 렌더링된 페이지로부터 복구됩니다.

4권의 실제 도서로 검증되었습니다: 2,432개의 하이라이트를 추출했고, 그중 815개가 내보내기 차단(454개 잘림 + 361개 완전 숨김)이었으며 — 전부 복구되었습니다. 복구된 텍스트는 킨들 앱 자체의 위치 눈금과 몇 글자 이내(중간 잔차 0–1)에 정확히 들어맞았습니다. 스킬의 모든 주의점은 이 실제 디버깅 과정에서 얻어진 것입니다. 제한이 존재하는 이유, 이를 해결한 세 가지 돌파구, 내보내기 모음이 무엇이 되는지에 대한 제작 스토리는 Substack에 게재된 "How to Take Back Your Kindle Highlights"에 정리되어 있습니다.

범위: 이 스킬은 사용자 자신의 Amazon 계정에서 자신의 하이라이트를, 직접 로그인한 브라우저 세션을 구동하고 Mac의 킨들 앱이 저장한 파일을 읽어서 내보냅니다. 출력물은 개인 메모용입니다 — 책 본문은 저작권이 있으므로 추출한 메모는 비공개로 유지하세요.

필수 요건 (macOS 전용): 이 파이프라인은 세 가지 면에서 macOS 전용입니다: 브라우저 제어는 AppleScript로 실행되고, OCR은 Apple의 Vision 프레임워크를 사용하며, 하이라이트 위치는 Mac 킨들 앱의 데이터 파일에서 가져옵니다.

  • Claude Desktop의 "Control Chrome" 확장 — Anthropic의 브라우저 제어 MCP로, Claude Desktop → 설정 → 확장에서 원클릭 설치 가능. 실제 Chrome에서 JavaScript를 실행하는 검증된 경로입니다(탭에서 JS를 실행할 수 있는 어떤 브라우저 MCP든 대체 가능). Chrome 설정이 하나 필요합니다: Chrome 메뉴 막대 → 보기 → 개발자 → Apple 이벤트에서 JavaScript 허용 → 체크 → Chrome 종료 후 재실행.
  • Google Chrome, Amazon 계정에 로그인된 상태 (스킬이 read.amazon.com을 구동합니다).
  • 최신 Mac 킨들 앱 (App Store; 번들 ID com.amazon.Lassen — 구버전 Kindle.app이 아님), 동일한 Amazon 계정에 로그인되어 있고 책이 다운로드되어 있어야 함. 이 앱의 동기화된 주석 데이터베이스는 내보내기 제한 없이 정확한 하이라이트 범위를 제공합니다.
  • Xcode 커맨드 라인 도구 (xcode-select --install) — 대량 복구 경로는 Apple Vision을 사용하는 작은 Swift OCR 헬퍼를 컴파일합니다(swiftc).
  • python3 — 최종 Markdown을 생성하고, 리더 페이지가 캡처본을 POST하는 로컬호스트 리시버(127.0.0.1:8931)를 실행합니다.

간단한 동작 방식:

  • 노트북 페이지 DOM의 모든 하이라이트를 JSON으로 스크래핑합니다(원문 타이포그래피 보존).
  • 킨들 앱의 SQLite 데이터베이스에서 글자 단위로 정확한 하이라이트 위치를 읽습니다 — 웹 내보내기가 완전히 숨긴 하이라이트도 포함해서.
  • 차단된 텍스트는 Cloud Reader의 렌더링된 페이지를 캔버스로 캡처(OS 스크린샷 불필요)하고, Apple Vision으로 로컬에서 OCR 처리(토큰 비용 0)한 뒤, 알려진 위치에 맞춰 텍스트를 잘라냅니다.
  • 최종적으로 ### Location N 섹션과 원문 그대로의 인용 블록, 그리고 복구되었거나 근사치인 항목에 대한 플래그가 포함된 하나의 Markdown 파일을 출력합니다.
원문 보기
원문 보기 (영어)
l3a0's Claude Code plugins A personal collection of Claude Code skills, published as a single plugin under the l3a0 namespace. This repo is both the plugin and its own marketplace. I write about how these tools get built — and about technology, business, and finance — at baowebdev.substack.com . Install claude plugin marketplace add l3a0/claude-plugins claude plugin install l3a0@l3a0 Skills are invoked as /l3a0:<skill-name> (the bare /<skill-name> also works while no other installed command claims the name), and Claude auto-invokes them when a request matches a skill's description. Skills kindle-highlights Export a heavily-highlighted book from Amazon's notebook page and some highlights come back cut off mid-sentence, while others come back as a bare location number with no text at all, under this notice: "Some highlights have been hidden or truncated due to export limits." Those are your own notes, in your own account, capped by a budget Amazon doesn't document and you can't raise. This skill gets them back: it extracts every highlight for a book from the Kindle notebook ( read.amazon.com/notebook ) into one combined, verbatim, location-cited Markdown file — including the highlights the export limit truncates or hides entirely, which are recovered from the Mac Kindle app's synced annotation positions plus the Cloud Reader's rendered pages. Proven on four real books: 2,432 highlights extracted, 815 of them export-blocked (454 truncated + 361 fully hidden) — every one recovered , with recovered text landing within a couple of characters of the Kindle app's own position ruler (median residual 0–1). Every gotcha in the skill was earned by real debugging across those runs. The build story — why the export limit exists, the three unlocks that beat it, and what a library of exports becomes — is written up in How to Take Back Your Kindle Highlights , also published on Substack . Scope: this exports your own highlights from your own Amazon account, by driving your own logged-in browser session and reading files the Kindle app stores on your Mac. The output is for your personal notes — book text is copyrighted, so keep extracted notes private. Prerequisites (macOS only) The pipeline is macOS-only three times over: browser control runs over AppleScript, OCR uses Apple's Vision framework, and highlight positions come from the Mac Kindle app's data files. Claude Desktop with the "Control Chrome" extension — Anthropic's browser-control MCP, installed in one click from Claude Desktop → Settings → Extensions. It is the skill's verified path for executing JavaScript in your real Chrome (any browser MCP that can run JS in the tab can substitute). It requires a Chrome setting: Chrome menu bar → View → Developer → Allow JavaScript from Apple Events → check → quit and relaunch Chrome. Google Chrome , signed in to your Amazon account (the skill drives read.amazon.com ). The current Mac Kindle app (App Store; bundle id com.amazon.Lassen — not the classic Kindle.app), signed in to the same Amazon account, with the book downloaded. Its synced annotation database provides exact highlight extents with no export limit. Xcode Command Line Tools ( xcode-select --install ) — the bulk-recovery path compiles a small Swift OCR helper ( swiftc ) that uses Apple Vision. python3 — builds the final Markdown and runs a localhost receiver ( 127.0.0.1:8931 ) that the reader page POSTs captures to. What it does, briefly Scrapes all highlights from the notebook page DOM to JSON (verbatim typography preserved). Reads exact character-precise highlight positions from the Kindle app's SQLite database — including highlights the web export hides completely. For blocked text, captures the Cloud Reader's rendered pages via canvas (no OS screenshots needed), OCRs them locally with Apple Vision (zero tokens), and cuts the text to the known positions. Emits one Markdown file with ### Location N sections, blockquoted verbatim text, and flags for anything recovered or approximate, then runs a QA pass. License MIT