$npx -y skills add tronghieu/agent-skills --skill deep-readerDeep-read long books and papers using Mortimer Adler's inspectional / analytical / syntopical method, the Recite step from SQ3R, and S. Keshav's three-pass method for papers, with page-anchored notes as external memory so the agent never has to load the whole text into one contex
| 1 | # Deep Reader |
| 2 | |
| 3 | Read long books and papers the way a careful human researcher does: skim for |
| 4 | structure first, read deeply chapter by chapter with notes as you go, then |
| 5 | synthesize from the notes — never the raw text — at the end. The method comes |
| 6 | from Adler's *How to Read a Book*, SQ3R's Recite step, and Keshav's three-pass |
| 7 | method for papers. |
| 8 | |
| 9 | ## Why multi-pass, why notes |
| 10 | |
| 11 | An LLM's attention dilutes over long contexts, and it loses track of material |
| 12 | buried in the middle of a big prompt ("lost in the middle"). Loading a |
| 13 | 500-page book into one context and asking questions about it produces answers |
| 14 | that quietly forget chapter 3 by the time you're discussing chapter 12. |
| 15 | |
| 16 | The fix is the same one human researchers use: never hold the whole book in |
| 17 | working memory at once. Read it in passes — first for structure, then chapter |
| 18 | by chapter for content — and externalize what you learn into note files as you |
| 19 | go. The notes become the durable memory; the book itself only needs to be |
| 20 | back in view when you're actively reading a specific chapter or verifying a |
| 21 | specific claim. Page numbers are the coordinate system that makes every claim |
| 22 | traceable back to the source, in this session or a later one. |
| 23 | |
| 24 | ## Two modes |
| 25 | |
| 26 | - **overview** — Adler's inspectional pass only: a book map plus a |
| 27 | goal-directed summary of the chapters that matter most to the reader's |
| 28 | purpose. Fast, no per-chapter notes. |
| 29 | - **study** — the full pipeline: reading purpose → inspectional map → |
| 30 | chapter-by-chapter analytical notes with Recite verification → hierarchical |
| 31 | synthesis answering Adler's four questions → mechanical quote verification. |
| 32 | |
| 33 | The user picks (or you propose one from `mode_hint` + their stated purpose — |
| 34 | see Step 1). |
| 35 | |
| 36 | ## Workspace layout |
| 37 | |
| 38 | Everything the pipeline produces lives in a workspace directory, by default a |
| 39 | sibling of the source file, so it survives across sessions: |
| 40 | |
| 41 | ``` |
| 42 | <slug>-notes/ |
| 43 | ├── source.txt # full text with [[page N]] markers — the coordinate system |
| 44 | ├── chapters.tsv # confirmed structure: chNN<TAB>from<TAB>to<TAB>title |
| 45 | ├── chapters/ # per-chapter files cut by split-chapters.sh |
| 46 | │ └── ch01-<slug>.txt |
| 47 | ├── map.md # inspectional pass output |
| 48 | ├── terms.md # key-terms ledger, cross-chapter |
| 49 | ├── notes/ |
| 50 | │ └── ch01-<slug>.md # one analytical note per chapter (papers: sec01-<slug>.md) |
| 51 | └── synthesis.md # final synthesis + verification log |
| 52 | ``` |
| 53 | |
| 54 | This workspace, not the SKILL.md scripts, is what makes a later session able |
| 55 | to answer a follow-up question without re-reading the book (see "Answering |
| 56 | from existing notes" below). |
| 57 | |
| 58 | ## Scripts at a glance |
| 59 | |
| 60 | All seven scripts live in `scripts/` under this skill. Run them either as |
| 61 | `bash ./scripts/<name>.sh ...` from the skill directory, or as |
| 62 | `bash /mnt/skills/user/deep-reader/scripts/<name>.sh ...` on claude.ai — both |
| 63 | forms invoke the same script, use whichever matches where you're running. |
| 64 | |
| 65 | | Script | Arguments | Purpose | |
| 66 | | --- | --- | --- | |
| 67 | | `prepare-text.sh` | `<input-file> [workspace-dir]` | Convert source to paged `source.txt`, create the workspace | |
| 68 | | `extract-structure.sh` | `<source.txt>` | Heuristic outline seed (a starting guess, not ground truth) | |
| 69 | | `read-pages.sh` | `<source.txt> <from> [to]` | Print a page or page range, with `[[page N]]` markers intact | |
| 70 | | `search-book.sh` | `<source.txt> <pattern> [context-lines]` | Grep the whole book, page-annotated results | |
| 71 | | `split-chapters.sh` | `<source.txt> <chapters.tsv>` | Cut confirmed chapters into standalone files | |
| 72 | | `build-diagram.sh` | `<workspace-dir> [--append]` | Mechanical Mermaid mindmap of the structure | |
| 73 | | `verify-quotes.sh` | `<workspace-dir>` | Catch fabricated quotes and wrong page citations | |
| 74 | |
| 75 | ## Step 0 — Prepare |
| 76 | |
| 77 | Locate the source file, then convert and page it: |
| 78 | |
| 79 | ```bash |
| 80 | bash ./scripts/prepare-text.sh path/to/book.pdf |
| 81 | # or on claude.ai: |
| 82 | bas |