PDF Q&A Reader
Read a PDF inside VS Code, select the passage you did not follow, and ask Claude Code
about it. The answer is grounded in an image of that passage, so formulas are read
correctly rather than from garbled extracted text, and every question and answer is
saved to a log next to the PDF with the printed page, the section and the theorem it
belongs to. At the end of a reading session one command turns the log into reading notes
with citations.
Built for reading dense material: textbooks, lecture notes, papers, proofs.

The entry that /pdf-ask wrote to the log for that passage, rendered as Markdown:

What you need
- Claude Code in VS Code. This extension captures the
passage; Claude Code answers and writes the notes.
- Python 3 with PyMuPDF (
pip install pymupdf), used to locate the passage and render
the crop images.
Setup
- Install this extension.
- Run PDF Q&A: Install Claude Code Skills from the Command Palette. It copies the
/pdf-ask and /pdf-summary skills into ~/.claude/skills/. The extension also
offers this the first time you capture a passage. Start a new Claude Code
conversation afterwards so it picks them up.
Reading loop
- Right-click a PDF in the Explorer, choose Open in PDF Q&A Reader (or use
Reopen Editor With... on an open PDF).
- Select a passage and press Alt+Q (
Cmd+Alt+Q on macOS), or use the Ask about
selection button or the right-click menu. For an equation or a figure, where
selecting text is awkward, press Alt+R and drag a box around it. Page
captures the whole current page.
- Focus moves to the Claude Code input. Type
/pdf-ask and your question.
- Claude reads a crop image of the passage, resolves the results it cites (for example
the theorem the proof appeals to, ten pages back), answers, and appends the entry to
notes/<pdf name>/qa-log.md beside the PDF. Follow-up questions are logged under the
same entry.
- When you are done, run
/pdf-summary, or narrow it with /pdf-summary chapter 1 or
/pdf-summary today. It writes notes/<pdf name>/summary.md, ordered by the source's
own sections, with page and theorem citations, open questions and a reference list.
A ## My notes section you add there is preserved when the summary is regenerated.
You can also paste a quote instead of capturing: /pdf-ask p. 32 "Since the increments of our martingale are bounded..." why does that suffice? The passage is then located in
the PDF automatically.
What the answers look like
The skills are written for careful reading rather than a quick paraphrase:
- Page references are the printed page numbers of the document, with the PDF page in
parentheses, detected from the running headers when the PDF has no page labels.
- Each answer separates what the source states, with its page, from reasoning that was
added, and marks added steps that were not checked.
- Apparent typos, broken references and gaps in the source are reported, not silently
repaired.
- Cross-references are resolved and cited: "Lemma 1.5.4", "(1.5.8)", "Section 1.5".
Files it writes
| Path |
What |
~/.pdfqa/selection.json |
The latest capture: PDF path, page, position on the page, selected text |
~/.pdfqa/captures.jsonl |
Every capture, one per line |
<pdf dir>/notes/<pdf name>/qa-log.md |
The Q&A log |
<pdf dir>/notes/<pdf name>/crops/ |
Passage images shown in the log |
<pdf dir>/notes/<pdf name>/source.md |
Citation and BibTeX, written on the first question |
<pdf dir>/notes/<pdf name>/summary.md |
Output of /pdf-summary |
Nothing is sent anywhere by the extension: it makes no network requests and collects no
telemetry. The PDF and the captured passage reach Claude only through your own Claude
Code session when you ask a question.
Settings
pdfQa.notesDirectory (default ${pdfDir}/notes): where the per-PDF notes folders
go. ${pdfDir} is the PDF's folder, ${workspaceFolder} the first workspace folder.
pdfQa.focusClaudeAfterCapture (default on): move focus to the Claude Code input
after a capture.
To make this the default viewer for PDFs, add to your settings:
"workbench.editorAssociations": { "*.pdf": "pdfQa.viewer" }
Viewer
Ctrl+F searches (Enter and Shift+Enter step through matches, Esc clears), the page box
plus Enter jumps to a page, and zoom has fit-width, fit-page and percentage presets.
Internal links work, so a reference in a hyperref PDF takes you to the theorem. The page
and zoom are remembered per file.
Credits
Rendering by PDF.js (Apache 2.0), bundled with the
extension; see THIRD-PARTY-NOTICES.md. Extension code under the MIT license.