coreyhaines31/makerskills / skills/read-book
read-book
VerifiedWhen you want to read and extract structured notes from a book — PDF, EPUB, MOBI, markdown, .txt, pasted text, or URL to a public-domain work. Reads in chunks (by chapter when a TOC exists, by 50-page blocks otherwise), extracts per-chapter TL;DR + key concepts + quotes + action items + frameworks, and offers to capture to second-brain raw/ as a highlights- file. Four modes — notes (default, chapter-by-chapter), summary (whole-book TL;DR + 3–5 takeaways), quotes (pull-quote highlights only), study (notes + Q&A spaced-rep prep). Triggers on "/read-book," "read this book," "extract notes from this PDF," "what's in this book," "summarize this ebook," "pull quotes from this." Sibling to watch-video (same content-consumption pattern, different medium).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.5 KB |
| references/output-modes.md | markdown | 6.6 KB |
| references/sources.md | markdown | 3.1 KB |
references/sources.md
View on GitHub# Per-source ingestion
How to get usable text from each input type. Skill picks based on file extension or URL pattern.
---
## PDF
**Native path** — Claude's `Read` tool handles PDFs directly:
```
Read tool with file_path="<pdf>" pages="1-10"
```
Max ~10 pages per call. For longer books, chunk per the chunking plan.
**Get TOC + page count first:**
```bash
# Page count
pdfinfo "<pdf>" 2>/dev/null | awk '/^Pages:/ {print $2}'
# Outline / bookmarks (PDF TOC)
pdftk "<pdf>" dump_data 2>/dev/null | grep -A 2 "BookmarkTitle:" | head -50
# Or with mutool (faster, comes with mupdf):
mutool show "<pdf>" outline 2>/dev/null | head -50
# Fallback: scan the first 5 pages for "Contents" or "Table of Contents"
Read tool with file_path="<pdf>" pages="1-5"
```
**Scanned PDFs (no text layer):**
```bash
# Check if text exists
pdftotext -layout "<pdf>" - 2>/dev/null | wc -c
# If <1000 chars for a 100-page book, it's scanned. Need OCR:
brew install ocrmypdf
ocrmypdf "<pdf>" "<pdf-ocr.pdf>"
# Then proceed with the OCR'd version
```
---
## EPUB
Convert to markdown via pandoc (preserves chapter structure):
```bash
# Install once: brew install pandoc
pandoc "<book.epub>" -o "<workdir>/book.md" --wrap=none
```
The output has `# Chapter X` headers — easy to chunk.
For richer metadata + cover extraction, use calibre's `ebook-convert`:
```bash
# Install once: brew install calibre
ebook-convert "<book.epub>" "<workdir>/book.txt"
# Calibre also extracts metadata.opf alongside
```
---
## MOBI / AZW3
Use `ebook-convert` (calibre) — pandoc doesn't handle MOBI well:
```bash
ebook-convert "<book.mobi>" "<workdir>/book.epub"
# Then pandoc as above:
pandoc "<workdir>/book.epub" -o "<workdir>/book.md" --wrap=none
```
Or directly to txt:
```bash
ebook-convert "<book.mobi>" "<workdir>/book.txt"
```
---
## Markdown / .txt
Just `Read` it. No conversion. Chunk by character count (30K per chunk).
---
## Pasted text
Use what was pasted. Treat like a single chunk if short (<30K chars), or chunk by character count if long.
If the user pastes only a section of a book ("read this chapter for me"), treat as 1-chunk and skip the per-chapter aggregation.
---
## URL (public-domain text)
```bash
# Fetch the URL (your agent's URL fetch, or curl)
# Project Gutenberg pattern: https://www.gutenberg.org/files/<id>/<id>-0.txt
# Archive.org pattern: https://archive.org/stream/<id>/<id>_djvu.txt
```
For Project Gutenberg, prefer the `.txt` URL over HTML — clean text, easy to chunk.
---
## Metadata extraction
For every source, extract these into the workdir's `metadata.json`:
```json
{
"title": "<book title>",
"author": "<author>",
"year": "<year if available>",
"source": "<original path or URL>",
"type": "pdf" | "epub" | "mobi" | "markdown" | "text" | "url",
"page_count": 287,
"word_count": 95000,
"has_toc": true,
"captured_at": "YYYY-MM-DD"
}
```
For PDFs: `pdfinfo` gives title, author, page count out of the box.
For EPUB: `unzip -p <file> META-INF/container.xml` and the OPF file inside have full metadata.
For markdown/text: ask the user for title + author if not in the filename.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |