Install any skill in seconds. Free to start, no credit card required.
Get Started Free →xuzhougeng/pdf-explore
Use this skill when the user has attached a PDF, paper, report, or other document and the answer needs its content: summarize a section, compare sections, read specific pages, check the table of contents, or read a value off a figure. The `read` tool cannot parse PDF binary — python is the extraction path. Provides `pdf_pages` (pages as text or rendered PNGs, cached) and `pdf_outline` (embedded-bookmark TOC) in the persistent python kernel; load them once via the Kernel Sidecar exec line that `u
Passed 16 of 19 test cases with the skill, and 10 of 19 without it.
and 4 more in the full report
7 fixed12 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 7 test cases the skill fixed. Same model, same prompt, with and without the skill.
When starting a new session to inspect PDFs with this toolset, what initial step must be run in the Python environment before calling `pdf_outline` or `pdf_pages`?
| Checked | Without skill | With skill |
|---|---|---|
| States that the Python kernel sidecar setup code must be executed first. | Missed | Passed |
The instructions your model reads when the skill loads.
read chokes on PDF binary, and pasting a 50-page document costs 40K+
tokens. The sidecar parses once into the persistent Python kernel (memory +
disk cached), after which you pull exactly the pages the question needs.
Setup, once per session: run the exec(...) line from the "Python
Kernel Sidecar" section at the end of this skill's use_skill output.
Definitions survive across cells until the kernel restarts. pypdfium2 is
required (pillow too for image mode); if the first call raises
ImportError, follow its hint and re-run.
| call | use for | gives |
|---|---|---|
pdf_outline(path) | any structured document — start here | [{page, heading, level}] from embedded bookmarks, [] + hint when absent |
pdf_pages(path, pages=[...], mode="text") | the specific pages you need | [{page, text, n_chars}] |
pdf_pages(path, mode="image", dpi=200, pages=[N]) | figures, scans | one PNG per page in .cache/pdf-explore/, for view_image |
default mode="auto" | unknown file | text, auto-switching to images when pages have no text layer |
toc = pdf_outline("report.pdf")
for entry in toc:
indent = " " * (entry["level"] - 1)
print(f'p{entry["page"]:>3} {indent}{entry["heading"]}')
Costs nothing when bookmarks exist (LaTeX-compiled papers almost always
have them). On [], there is no LLM fallback here — print the opening
lines of each page from pdf_pages(path, mode="text") and build the map
yourself. Watch for the [pdf_outline] offset warning: some PDFs bookmark
logical page numbers, which are shifted from file page numbers by the
front matter.
test cases passed, vs 10 / 19 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.