Book Note Extractor

/read-book — Extract structured notes from books and long PDFs

by coreyhaines31 · MIT license · ★ 855 on GitHub

/read-book — Extract structured notes from books and long PDFs cover

When 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…

---
name: read-book
description: When 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).
metadata:
  version: 0.1.1
---

# /read-book — Extract structured notes from books and long PDFs

Sibling to `watch-video`. Same content-consumption pattern: ingest → chunk → extract → optionally capture to second-brain.

## Step 1 — Parse input

Accept:
- **PDF**: file path (Claude reads PDFs natively in chunks via `Read pages:"X-Y"`)
- **EPUB / MOBI**: file path (needs `pandoc` or `ebook-convert` to extract — see `references/sources.md`)
- **Markdown / .txt**: file path (read directly)
- **Pasted text**: just use what was pasted

Overview

Sibling to watch-video. Same content-consumption pattern: ingest → chunk → extract → optionally capture to second-brain.

Example prompts

/read-book — Extract structured notes from books and long PDFs
Manual install (npx, ZIP)
Claude Codenpx skills add coreyhaines31/makerskills --skill read-book -g -a claude-code
Claude Code (degit)npx degit coreyhaines31/makerskills/skills/read-book#main ~/.claude/skills/read-book
Claude.ai / desktopZip the folder and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md8.5 KB
Read SKILL.md here
coreyhaines31/main1 file shown
SKILL.md
Show the full text174 lines

/read-book — Extract structured notes from books and long PDFs

Sibling to watch-video. Same content-consumption pattern: ingest → chunk → extract → optionally capture to second-brain.

Step 1 — Parse input

Accept:

  • PDF: file path (Claude reads PDFs natively in chunks via Read pages:"X-Y")
  • EPUB / MOBI: file path (needs pandoc or ebook-convert to extract — see references/sources.md)
  • Markdown / .txt: file path (read directly)
  • Pasted text: just use what was pasted
  • URL to public-domain text: fetch it with your agent's URL-fetch tool or curl (Project Gutenberg, archive.org, etc.)

Detect type from file extension. If ambiguous, ask.

Step 2 — Parse mode

Invocation Mode What you get
/read-book <input> notes (default) Chapter-by-chapter: TL;DR + key concepts + quotes + action items + frameworks
/read-book <input> summary summary Whole-book TL;DR (1 paragraph) + 3–5 key takeaways + who-it's-for
/read-book <input> quotes quotes Pull-quote highlights only, with chapter context and page refs
/read-book <input> study study Notes mode + 10–20 spaced-repetition Q&A cards

If the book is long (>200 pages) and mode is unspecified, default to notes but warn it'll take many tool calls.

Step 3 — Get the text + chunk

See references/sources.md for per-source ingestion. Output of this step: text content + a chunking plan.

Chunking strategy (hybrid, in priority order):

  1. By chapter if a TOC exists (PDF with bookmarks, EPUB/MOBI converted via pandoc preserves chapter headers)

    • Use pdfinfo <pdf> | grep "Pages" for PDFs
    • Use pdftotext -layout <pdf> | grep -i "^chapter\|^part" for chapter detection, or read TOC from page 1–5
    • EPUB: after pandoc <epub> -o tmp.md, chunks are between # Chapter X headers
  2. By page count for PDFs without TOC: 50 pages per chunk

  3. By character count for text/markdown: 30,000 chars per chunk (~7,500 words)

Save the chunking plan as ~/Documents/books/<author>-<title-slug>-<YYYY-MM-DD>/chunks.json:

{
  "source": "<path>",
  "title": "<book title>",
  "author": "<author>",
  "type": "pdf",
  "total_pages": 287,
  "chunking": "by-chapter",
  "chunks": [
    {"i": 0, "label": "Introduction", "pages": "1-12"},
    {"i": 1, "label": "Chapter 1: The Problem", "pages": "13-32"},
    ...
  ]
}

Step 4 — Read each chunk

Loop:

  1. Read chunk N (Read tool with pages: for PDF, full file for text/MD)
  2. Extract per the chosen mode (see references/output-modes.md for templates)
  3. Append the chunk's notes to ~/Documents/books/<workdir>/notes-<NNN>-<label-slug>.md

For PDFs, don't read the whole book in one call — Claude's PDF tool maxes around 10 pages. Process chunks individually.

If a chunk fails to extract anything useful (e.g., it's mostly diagrams or front-matter), log the skip and continue.

Step 5 — Aggregate into final notes file

Combine all chunk notes into a single ~/Documents/books/<workdir>/notes.md matching the mode's full-book template (see references/output-modes.md).

Top of the file always has the metadata block + the second-brain-compatible frontmatter:

source: <file path or URL>
captured: YYYY-MM-DD
type: book
book_title: <title>
author: <author>
mode: notes
chunks: <count>
chunking: <strategy>

# <title> by <author>

## TL;DR
<2–3 sentences>

## Key takeaways
1. ...

## Chapter notes
...

## Cross-references (suggested for wiki)
- Could connect to [[Longevity Biomarkers]] (per Chapter 3 discussion of biomarkers)
- Could connect to [[Productivity & Systems]] (per Chapter 7 framework)

The cross-reference suggestions are advisory — they're suggestions for /sb compile to act on, not auto-applied. Keep responsibilities separated.

Step 6 — Offer to capture to second-brain

Ask:

"Want to capture this to second-brain? I'll write it to ${SECOND_BRAIN_VAULT:-$HOME/Documents/SecondBrain}/raw/highlights-<slug>.md matching your vault's highlights- type prefix."

Default is ask, never auto-write. If yes:

  1. Copy the final notes.md (with the second-brain-compatible frontmatter at top) to ${SECOND_BRAIN_VAULT:-$HOME/Documents/SecondBrain}/raw/highlights-<slug>.md
  2. Tell the user the path
  3. Suggest: "Run /sb compile later to merge this into wiki pages — the cross-reference suggestions in the footer are starting points."

If the user skips capture, the workdir still has everything — they can grab the file later.

Step 7 — Report

In chat:

  • One-line headline: <title> · <author> · <total_pages or word count> · <mode> · <chunks processed>
  • Workdir path
  • The TL;DR section
  • For notes / study modes: brief list of top 3 takeaways
  • For quotes mode: top 3 quotes
  • If captured to second-brain: that path too

Modes (quick invocations)

Invocation Mode Behavior
/read-book <input> notes Full pipeline, default mode
/read-book <input> summary summary Just TL;DR + key takeaways (1 read pass for short books, sampled chapters for long)
/read-book <input> quotes quotes Chapter-by-chapter, but only output quotes
/read-book <input> study study Notes + Q&A spaced-rep cards
/read-book <input> --capture (any) Skip the ask step, auto-write to second-brain raw/
/read-book <input> --render pdf (any) Also render the final notes.md to PDF via pandoc (uses ~/.local/share/makerskills/render.css). See references/output-modes.md.
/read-book <input> --render html (any) Same as above but HTML

Composes with

  • second-brain — primary integration: writes highlights-<slug>.md to raw/. Then /sb compile merges into wiki pages.
  • deep-research — when a research question turns up a book, /read-book is the next step. Notes feed back into the research brief.
  • business-brainstorm — when scoring an idea (e.g., business books on similar models), read-book provides the structured evidence.
  • decide — when a decision hinges on what an authority has written (e.g., "should I take VC money?" → read Naval / Jason Cohen), read-book extracts the relevant chapter.
  • slide-deck — book takeaways → talk material (book talk pattern).
  • watch-video — sibling skill, same content-consumption pattern. Audiobook? Use watch-video transcript mode.
  • nonfictionskills / fictionskills — when researching to write a book, this skill reads the comp titles.

Error handling

Failure Response
EPUB/MOBI without pandoc / ebook-convert Tell the user: brew install pandoc or brew install calibre (calibre includes ebook-convert)
PDF is scanned (no text layer) Suggest OCR first: brew install ocrmypdf && ocrmypdf <pdf> <pdf-ocr.pdf>
PDF has no detectable TOC Fall back to 50-page chunks. Note in the metadata.
Book is unusually long (>500 pages) Warn cost / time, ask if the user wants summary mode instead of full notes
Chunk extraction empty Skip the chunk, log, continue. Don't fail the whole run.

Notes on quality

  • Don't summarize beyond recognition. A 30-page chapter should produce 8–15 lines of notes, not 3. Compression is good; flattening is bad.
  • Preserve specifics. Names, numbers, dates, quotes — keep them. The whole point is later-the user can grep "what did Andy Wilkinson say about X" and find it.
  • Quotes are sacred. When you flag a quote, copy it verbatim. Note the page if possible.
  • Action items are explicit. If the book makes you think "I should do X," flag it explicitly. These are the highest-leverage outputs.
  • Frameworks deserve their own bullets. When the author names a framework (e.g., "the 9-dimension filter," "Save the Cat beats"), call it out by name in the notes.
1---
2name: read-book
3description: When 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).
4metadata:
5 version: 0.1.1
6---
7 
8# /read-book — Extract structured notes from books and long PDFs
9 
10Sibling to `watch-video`. Same content-consumption pattern: ingest → chunk → extract → optionally capture to second-brain.
11 
12## Step 1 — Parse input
13 
14Accept:
15- **PDF**: file path (Claude reads PDFs natively in chunks via `Read pages:"X-Y"`)
16- **EPUB / MOBI**: file path (needs `pandoc` or `ebook-convert` to extract — see `references/sources.md`)
17- **Markdown / .txt**: file path (read directly)
18- **Pasted text**: just use what was pasted
19- **URL** to public-domain text: fetch it with your agent's URL-fetch tool or `curl` (Project Gutenberg, archive.org, etc.)
20 
21Detect type from file extension. If ambiguous, ask.
22 
23## Step 2 — Parse mode
24 
25| Invocation | Mode | What you get |
26|---|---|---|
27| `/read-book <input>` | **notes** (default) | Chapter-by-chapter: TL;DR + key concepts + quotes + action items + frameworks |
28| `/read-book <input> summary` | summary | Whole-book TL;DR (1 paragraph) + 3–5 key takeaways + who-it's-for |
29| `/read-book <input> quotes` | quotes | Pull-quote highlights only, with chapter context and page refs |
30| `/read-book <input> study` | study | Notes mode + 10–20 spaced-repetition Q&A cards |
31 
32If the book is long (>200 pages) and mode is unspecified, default to `notes` but warn it'll take many tool calls.
33 
34## Step 3 — Get the text + chunk
35 
36See `references/sources.md` for per-source ingestion. Output of this step: text content + a chunking plan.
37 
38**Chunking strategy** (hybrid, in priority order):
39 
401. **By chapter** if a TOC exists (PDF with bookmarks, EPUB/MOBI converted via pandoc preserves chapter headers)
41 - Use `pdfinfo <pdf> | grep "Pages"` for PDFs
42 - Use `pdftotext -layout <pdf> | grep -i "^chapter\|^part"` for chapter detection, or read TOC from page 1–5
43 - EPUB: after `pandoc <epub> -o tmp.md`, chunks are between `# Chapter X` headers
44 
452. **By page count** for PDFs without TOC: 50 pages per chunk
46 
473. **By character count** for text/markdown: 30,000 chars per chunk (~7,500 words)
48 
49Save the chunking plan as `~/Documents/books/<author>-<title-slug>-<YYYY-MM-DD>/chunks.json`:
50 
51```json
52{
53 "source": "<path>",
54 "title": "<book title>",
55 "author": "<author>",
56 "type": "pdf",
57 "total_pages": 287,
58 "chunking": "by-chapter",
59 "chunks": [
60 {"i": 0, "label": "Introduction", "pages": "1-12"},
61 {"i": 1, "label": "Chapter 1: The Problem", "pages": "13-32"},
62 ...
63 ]
64}
65```
66 
67## Step 4 — Read each chunk
68 
69Loop:
701. Read chunk N (`Read` tool with `pages:` for PDF, full file for text/MD)
712. Extract per the chosen mode (see `references/output-modes.md` for templates)
723. Append the chunk's notes to `~/Documents/books/<workdir>/notes-<NNN>-<label-slug>.md`
73 
74For PDFs, **don't read the whole book in one call** — Claude's PDF tool maxes around 10 pages. Process chunks individually.
75 
76If a chunk fails to extract anything useful (e.g., it's mostly diagrams or front-matter), log the skip and continue.
77 
78## Step 5 — Aggregate into final notes file
79 
80Combine all chunk notes into a single `~/Documents/books/<workdir>/notes.md` matching the mode's full-book template (see `references/output-modes.md`).
81 
82Top of the file always has the metadata block + the second-brain-compatible frontmatter:
83 
84```markdown
85source: <file path or URL>
86captured: YYYY-MM-DD
87type: book
88book_title: <title>
89author: <author>
90mode: notes
91chunks: <count>
92chunking: <strategy>
93 
94# <title> by <author>
95 
96## TL;DR
97<2–3 sentences>
98 
99## Key takeaways
1001. ...
101 
102## Chapter notes
103...
104 
105## Cross-references (suggested for wiki)
106- Could connect to [[Longevity Biomarkers]] (per Chapter 3 discussion of biomarkers)
107- Could connect to [[Productivity & Systems]] (per Chapter 7 framework)
108```
109 
110The cross-reference suggestions are advisory — they're suggestions for `/sb compile` to act on, not auto-applied. Keep responsibilities separated.
111 
112## Step 6 — Offer to capture to second-brain
113 
114Ask:
115 
116> *"Want to capture this to second-brain? I'll write it to `${SECOND_BRAIN_VAULT:-$HOME/Documents/SecondBrain}/raw/highlights-<slug>.md` matching your vault's `highlights-` type prefix."*
117 
118Default is **ask**, never auto-write. If yes:
1191. Copy the final `notes.md` (with the second-brain-compatible frontmatter at top) to `${SECOND_BRAIN_VAULT:-$HOME/Documents/SecondBrain}/raw/highlights-<slug>.md`
1202. Tell the user the path
1213. Suggest: *"Run `/sb compile` later to merge this into wiki pages — the cross-reference suggestions in the footer are starting points."*
122 
123If the user skips capture, the workdir still has everything — they can grab the file later.
124 
125## Step 7 — Report
126 
127In chat:
128- One-line headline: `<title> · <author> · <total_pages or word count> · <mode> · <chunks processed>`
129- Workdir path
130- The TL;DR section
131- For `notes` / `study` modes: brief list of top 3 takeaways
132- For `quotes` mode: top 3 quotes
133- If captured to second-brain: that path too
134 
135## Modes (quick invocations)
136 
137| Invocation | Mode | Behavior |
138|---|---|---|
139| `/read-book <input>` | notes | Full pipeline, default mode |
140| `/read-book <input> summary` | summary | Just TL;DR + key takeaways (1 read pass for short books, sampled chapters for long) |
141| `/read-book <input> quotes` | quotes | Chapter-by-chapter, but only output quotes |
142| `/read-book <input> study` | study | Notes + Q&A spaced-rep cards |
143| `/read-book <input> --capture` | (any) | Skip the ask step, auto-write to second-brain raw/ |
144| `/read-book <input> --render pdf` | (any) | Also render the final `notes.md` to PDF via pandoc (uses `~/.local/share/makerskills/render.css`). See `references/output-modes.md`. |
145| `/read-book <input> --render html` | (any) | Same as above but HTML |
146 
147## Composes with
148 
149- `second-brain` — primary integration: writes `highlights-<slug>.md` to `raw/`. Then `/sb compile` merges into wiki pages.
150- `deep-research` — when a research question turns up a book, `/read-book` is the next step. Notes feed back into the research brief.
151- `business-brainstorm` — when scoring an idea (e.g., business books on similar models), read-book provides the structured evidence.
152- `decide` — when a decision hinges on what an authority has written (e.g., "should I take VC money?" → read Naval / Jason Cohen), `read-book` extracts the relevant chapter.
153- `slide-deck` — book takeaways → talk material (book talk pattern).
154- `watch-video` — sibling skill, same content-consumption pattern. Audiobook? Use `watch-video transcript` mode.
155- `nonfictionskills` / `fictionskills` — when researching to *write* a book, this skill reads the comp titles.
156 
157## Error handling
158 
159| Failure | Response |
160|---|---|
161| EPUB/MOBI without pandoc / ebook-convert | Tell the user: `brew install pandoc` or `brew install calibre` (calibre includes `ebook-convert`) |
162| PDF is scanned (no text layer) | Suggest OCR first: `brew install ocrmypdf && ocrmypdf <pdf> <pdf-ocr.pdf>` |
163| PDF has no detectable TOC | Fall back to 50-page chunks. Note in the metadata. |
164| Book is unusually long (>500 pages) | Warn cost / time, ask if the user wants summary mode instead of full notes |
165| Chunk extraction empty | Skip the chunk, log, continue. Don't fail the whole run. |
166 
167## Notes on quality
168 
169- **Don't summarize beyond recognition.** A 30-page chapter should produce 8–15 lines of notes, not 3. Compression is good; flattening is bad.
170- **Preserve specifics.** Names, numbers, dates, quotes — keep them. The whole point is later-the user can grep "what did Andy Wilkinson say about X" and find it.
171- **Quotes are sacred.** When you flag a quote, copy it verbatim. Note the page if possible.
172- **Action items are explicit.** If the book makes you think "I should do X," flag it explicitly. These are the highest-leverage outputs.
173- **Frameworks deserve their own bullets.** When the author names a framework (e.g., "the 9-dimension filter," "Save the Cat beats"), call it out by name in the notes.
174 
View all files on GitHub →

Details

License
MIT
Stars on the repo
★ 855
Checked
Source
coreyhaines31/makerskills ↗
Creator
coreyhaines31 · 62 listings
View creator

Similar skills

See all →

More from coreyhaines31

SkillLead Magnet Buildercoreyhaines31/marketingskills · by coreyhaines31Tell us about your business and who you sell to, and get back a ready-to-launch free offer that turns website visitors into email signups and future customers.★ 51.1k GitHub starsSkillGrowth Experimentation Programcoreyhaines31/marketingskills · by coreyhaines31When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program," or "experiment playbook." Use this whenever someone is comparing two approaches and wants to measure which performs better, or when they want to build a systematic experimentation practice. For tracking implementation, see analytics. For page-level conversion optimization, see cro.★ 51.1k GitHub starsSkillAd Creative Generatorcoreyhaines31/marketingskills · by coreyhaines31When the user wants to generate, iterate, or scale ad creative — headlines, descriptions, primary text, or full ad variations — for any paid advertising platform. Also use when the user mentions 'ad copy variations,' 'ad creative,' 'generate headlines,' 'RSA headlines,' 'bulk ad copy,' 'ad iterations,' 'creative testing,' 'write me some ads,' 'Facebook ad copy,' 'Google ad headlines,' 'LinkedIn ad text,' 'static ads,' 'ad templates,' 'iMessage ad,' 'chat reveal ad,' 'ChatGPT ad,' 'Apple Notes ad,' 'AirDrop ad,' 'creative strategy,' 'creative roadmap,' 'creative retro,' 'hook writing,' 'creative review page,' 'present ad creative for approval,' 'motion video ad,' 'faceless video ad,' 'UGC ad,' 'greenscreen ad,' 'TikTok/Reels ad format,' 'which ad format to make,' 'Meta ad format tier list,' or 'creative format taxonomy.' Use this whenever someone needs to produce ad copy at scale or iterate on existing ads. For campaign strategy and targeting, see ads. For landing page copy, see copywriting.★ 51.1k GitHub starsSkillBusiness Idea Pressure Testcoreyhaines31/makerskills · by coreyhaines31When you want to pressure-test a potential new business, product, or side project against the serial-founder filter. Not "marketing ideas for a product" (that's marketing-skills:marketing-ideas) — this is "should this business exist + can you win it." Runs the idea through a structured framework (problem, audience, wedge, monetization, moat, portfolio fit, distribution, energy fit, opportunity cost), checks domain availability via /domain, optionally triggers /deep-research for market validation, and outputs a viability brief: build / sleep on it / pass. Archives every idea to ~/.config/makerskills/business-brainstorm/archive/ so past work is searchable. Triggers on "/business-brainstorm," "/brainstorm," "new business idea," "should I build X," "pressure test this idea," "validate this idea," "is X a good business," "what about a [type] for [audience]."★ 855 GitHub starsSkillTeam Knowledge Basecoreyhaines31/makerskills · by coreyhaines31Your team's shared, AI-ready knowledge base — people, companies, meetings, SOPs, and decisions structured so an agent can answer on your team's behalf. Team-scope sibling to second-brain. Modes — capture, compile (wiki pages + INDEX.md), query (trust-weighted, saved to outputs/), review (verify / deprecate / supersede stale captures), lint, connect, search. Structured raw dirs (people/, companies/, meetings/, sops/, decisions/, customer-language/, sales-objections/). Every capture stamps author, timestamp, and trust status. Optional sync from call transcripts, Slack/email exports, CRM. Vault at ${COMPANY_BRAIN_VAULT:-$HOME/Documents/CompanyBrain}/. Triggers on "/company-brain," "/cb," "capture this into the team brain," "log this meeting," "save this SOP," "compile the company wiki," "query the team brain," "what does the team know about X," "review the company brain," "lint the company brain," "who's the internal expert on X.★ 855 GitHub starsSkillMonthly Company CFOcoreyhaines31/makerskills · by coreyhaines31Monthly CFO workflow for a company or agency — pull raw data from bank + payment processor + payroll + expense management, categorize and reconcile, compute end-of-month cash via transaction-sum method, update a scenario projector for forward forecasting, write the monthly snapshot report, surface decisions to leadership. Modes — monthly (default; the standing report), weekly (thin cash pulse), scenario (ad-hoc modeling in the projector), pickup (resume where the prior run left off). Anonymized team-scope sibling to personal-cfo (which handles personal household finances). Composes with company-brain (report gets stored + wiki-indexed there), toolify (wire company-specific data sources), loopify (schedule the monthly + weekly runs). Triggers on "/company-cfo," "/cfo," "monthly cash report," "do the CFO snapshot," "CFO monthly," "let's run CFO," "cash projection," "runway forecast," "monthly financials," "cash pulse.★ 855 GitHub stars