PDF Explore
Use this skill when the user has attached a PDF, paper, report, or other document and...
Install
npx skills add HughYau/AcademicForge --skill pdf-explore -g -a claude-code -y- Repository
- HughYau/AcademicForge2.6k
- Category
- Documents
- Updated
- 2mo ago
- License
- Apache-2.0
- Context cost
- Mediumabout 2,842 tokens
- Runs scripts
- Yes, review before use
What it does
Use this skill when the user has attached a PDF, paper, report, or other document and the answer needs content from more than one place in it: summarize the methods or any other section, compare sections, find where a topic is discussed, read a value or label off a figure or chart, or find/list/extract every instance of something across the whole document (datasets, benchmarks, citations, figures, table rows, accession numbers, including appendices). Parses the PDF once with a deterministic Python kernel: `pdf_pages` (pages as persistent text, or high-res images), `pdf_outline` (embedded TOC), `pdf_scan` (a lexical pre-filter that narrows a long doc to candidate pages), `pdf_grep` (regex sweep for exhaustive pattern extraction). You read the shortlist and do the relevance / summary / extraction judgment yourself. For PDF creation/manipulation, use reportlab/pypdf directly.
PDF Explore, navigate a PDF too big to embed
A 50-page PDF read in full is ~200K tokens of context. When the answer draws on several sections at once (summarize the methods; compare section 3 and section 5), or when the answer is "every page" (list all the datasets / citations / figures / benchmarks mentioned anywhere in this document), reading the whole thing page-by-page is the expensive way to get it. This skill parses the PDF once into persistent text with a deterministic Python kernel, then lets you narrow, by outline, by lexical scan, by regex, and read only the pages you actually need, reasoning over them yourself. Nothing you read vanishes: it is ordinary text and ordinary files.
Setup (any agent, no API key)
This is a pure skill, kernel.py is deterministic Python and you
(the base model) do all the reasoning. There is no host runtime and no
LLM API. Load the helpers once per session in a Python cell:
exec(open("skills/claude-science/pdf-explore/kernel.py").read())
# adjust the path to wherever this skill is installed
Nothing auto-loads it outside Claude Science. Then call the helpers
directly (no import). If a helper is "not defined", you haven't exec'd
kernel.py yet, go back and run the line above.
Dependencies: pip install pypdfium2 pillow (pillow does the PNG encoding
for mode="image"; it is not pulled in by the pypdfium2 wheel).


