# PDF Explore

Use this skill when the user has attached a PDF, paper, report, or other document and...

- Repository: https://github.com/HughYau/AcademicForge (2620 stars)
- Category: Documents
- License: Apache-2.0
- Last updated: 2026-08-30
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add HughYau/AcademicForge --skill pdf-explore -g -a claude-code -y`
Codex: `npx skills add HughYau/AcademicForge --skill pdf-explore -g -a codex -y`
Cursor: `npx skills add HughYau/AcademicForge --skill pdf-explore -g -a cursor -y`
Gemini CLI: `npx skills add HughYau/AcademicForge --skill pdf-explore -g -a gemini-cli -y`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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:

```python
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).

## Which helper

The rest: https://github.com/HughYau/AcademicForge/blob/HEAD/skills/claude-science/pdf-explore/SKILL.md
