[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74MEJKWVFYSGR5CPT0YRT4K":3,"skill-same:01M74MEJKWVFYSGR5CPT0YRT4K":54},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M74MEJKWVFYSGR5CPT0YRT4K","pdf-explore",null,"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\u002Flist\u002Fextract every instance of something across the whole document (datasets, benchmarks, citations, figures, table rows, accession numbers — including appendices). Skip it only for a single lookup of 1–4 pages quoted in your very next response — `read_file(pages=[...])` attaches pages as images that are dropped from context after one turn, so multi-section answers end up re-reading the same ranges repeatedly. Parses the PDF once in the Python kernel: `pdf_pages` (pages as persistent text), `pdf_outline` (TOC), `pdf_scan` (rank pages by relevance), `pdf_map`\u002F`pdf_extract` (per-page summary \u002F structured fields via parallel haiku calls). For PDF creation\u002Fmanipulation, use reportlab\u002Fpypdf directly.","pengqianhan\u002FAI-Human-Research-OS","pengqianhan","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4286531?v=4","01M74M3DT9HNZ6HPAK8TX69EX9","PengqianHan","01M74M3DTVSN2GXW0JH2W396FK",3,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fclaude-science-skills\u002Fskills\u002Fpdf-explore\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: pdf-explore\ndescription: \"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\u002Flist\u002Fextract every instance of something across the whole document (datasets, benchmarks, citations, figures, table rows, accession numbers — including appendices). Skip it only for a single lookup of 1–4 pages quoted in your very next response — `read_file(pages=[...])` attaches pages as images that are dropped from context after one turn, so multi-section answers end up re-reading the same ranges repeatedly. Parses the PDF once in the Python kernel: `pdf_pages` (pages as persistent text), `pdf_outline` (TOC), `pdf_scan` (rank pages by relevance), `pdf_map`\u002F`pdf_extract` (per-page summary \u002F structured fields via parallel haiku calls). For PDF creation\u002Fmanipulation, use reportlab\u002Fpypdf directly.\"\nfold_cue: \"instead_of=read_file use=pdf_pages\u002Fpdf_outline\u002Fpdf_scan for multi-page PDF reads — read_file pages drop after one turn\"\nlicense: Apache-2.0\n---\n\n# PDF Explore — navigate a PDF too big to embed\n\nA 50-page PDF via `read_file` is ~200K tokens in context, and pages\nloaded with `read_file(pages=[...])` are dropped from context after one\nturn — so multi-section synthesis turns into re-reading the same pages\nover and over. And when the answer is \"every page\" (list all the\ndatasets \u002F citations \u002F figures \u002F benchmarks mentioned anywhere in this\ndocument), reading the whole thing page-by-page is the expensive way to\nget it. This skill parses the PDF once in the Python kernel and runs one\ncheap haiku call per page, **in parallel**, so you load only what\nmatters — or sweep every page without ever putting the pages in your own\ncontext.\n\n## Which helper\n\n| | when | returns |\n|---|---|---|\n| **`read_file(pages=[...])`** (no skill) | a single lookup of 1–4 pages you will quote in your *very next* response | pages as vision blocks — **dropped from context after one turn** |\n| **`pdf_pages(path, pages=[...], mode=\"text\")`** | you need several pages\u002Fsections *at the same time* — summaries, comparisons, anything where the answer draws on more than one range | `[{page, text}, ...]` — write to a file then `read_file`; stays in context like any tool output |\n| **`pdf_outline(path)`** | structured doc (paper, report, book) | `[{page, heading, level}, ...]` — a TOC |\n| **`pdf_scan(path, query, top_k)`** | semantic question, want the K most relevant pages | `{hits: [{page, relevance, summary, text}], n_scanned, usage}` |\n| **`pdf_extract(path, schema)`** | **exhaustive list of X across the whole doc** (datasets, citations, figures, table rows, entities) | `[{page, data, usage}, ...]` — then flatten + dedupe |\n| **`pdf_map(path, prompt)`** | unstructured doc (transcript, slide dump, compilation), or a free-text question of every page | `{pages: [{page, text}], n_pages, usage}` — every page's answer to `prompt` |\n| **`pdf_pages(mode=\"image\", dpi=200)` → `host.view_image(img, crop=…)`** | read a small value, axis label, or legend off a **figure** | a high-res crop of the figure, auto-attached as vision |\n\nLoading this skill auto-injects these into the Python kernel (from\n`kernel.py`); call directly, no import. Don't check for or install\n`pypdfium2` first — host-managed installs seed it in the default `python`\nenvironment, and if it's genuinely missing the first call raises with an\ninstall recipe (on platform-managed hosts the default env rejects\ninstalls — if the recipe's `manage_packages` call errors, create a domain\nenv with pypdfium2 **and pillow** and re-run there; pillow does the PNG\nencoding for `mode=\"image\"` and is not pulled in by the pypdfium2 wheel).\nGo straight to the helper call.\n\nNote: the default backend is pypdfium2 (Google PDFium; permissive\nApache-2.0\u002FBSD-3-Clause). PyMuPDF is honored as a fallback if already\ninstalled, but it is AGPL-3.0-licensed (commercial licenses available from\nArtifex): if you embed it in a network-accessible service, AGPL's\nsource-sharing terms apply to that service.\n\n## Recipe — pull the sections you need as persistent text (synthesis)\n\nFor \"summarize the methods\" \u002F \"compare section 3 and section 5\" \u002F anything\nwhere the answer draws on several page ranges at once, do **not** read the\nranges one `read_file` call at a time — each call's pages are dropped from\ncontext before you finish, and you will loop re-reading them. Pull **all**\nthe pages you need in **one** python call, write them to a file, then\n`read_file` that:\n\n```python\nwanted = [5, 21,22,23,24,25, 62,63,64, 124,125,126]  # from pdf_outline\nwith open(\"sections.txt\", \"w\") as f:\n    for p in pdf_pages(\"paper.pdf\", pages=wanted, mode=\"text\"):\n        f.write(f\"\\n── page {p['page']} ──\\n{p['text']}\")\nimport os; print(f\"wrote {os.path.getsize('sections.txt'):,} bytes\")\n```\n\nThen `read_file(file_path=\"sections.txt\")` — or with `offset=`\u002F`limit=` if\nit's over 100KB — and write the answer from that. **Don't `print()` the\npage text directly**: any python output over ~16KB is spilled to disk and\nyou'll be told to `read_file` it anyway, so printing a full chapter costs\ntwo tool calls where writing + reading costs the same two without the\nwasted preview. (For a quick look at ≤5 pages, printing is fine.)\n\n~800 tokens\u002Fpage of text vs ~4,000 tokens\u002Fpage as vision — and you only pay\nit once. Find the page numbers from `pdf_outline` (below) or the paper's\nown table of contents first.\n\n## Recipe — navigate by outline (try this first)\n\n```python\nfor e in pdf_outline(\"report.pdf\"):\n    print(f\"p{e['page']:>3} {'  ' * (e['level'] - 1)}{e['heading']}\")\n# → then read_file(file_path=\"report.pdf\", pages=[the section you want])\n```\n\nFree and instant when the PDF has an embedded outline (most\nLaTeX-compiled papers do). Falls back to a single batched LLM call on\ntext-layer ≤150pp docs (~$0.001-0.003 total), or per-page LLM heading\nextraction on scanned\u002F>150pp (~$0.002\u002Fpage). For a semantic question the\noutline doesn't obviously answer (\"where do they discuss\nlimitations\"), fall through to `pdf_scan`.\n\n## Recipe — find the pages relevant to a query\n\n```python\nr = pdf_scan(\"paper.pdf\", query=\"batch-effect correction methods\", top_k=5)\nfor h in r[\"hits\"]:\n    print(f\"p{h['page']}  {h['relevance']:.2f}  {h['summary'] or h['text'][:100]}\")\nprint(f\"[{r['n_scanned']} pages scanned, \"\n      f\"{r['usage']['input_tokens']} in + {r['usage']['output_tokens']} out]\")\n```\n\n(`summary` is populated only when `strategy=\"fanout\"` — the default\n`\"auto\"` uses single-call comparative ranking on text-mode docs ≤150pp,\nwhich is ~3× cheaper and ranks better but doesn't generate summaries.\nPass `strategy=\"fanout\"` if you want them.)\n\nThen load only those:\n\n```python\n# Either: call read_file from the harness (attaches as vision)\n#   read_file(file_path=\"paper.pdf\", pages=[h[\"page\"] for h in r[\"hits\"]])\n# Or: print the text right here\nfor h in r[\"hits\"]:\n    print(f\"\\n── page {h['page']} ──\\n{h['text'][:2000]}\")\n# Or: render hit pages to cwd (PNGs auto-attach as vision next turn).\n# Fine for layout\u002Fskimming — but a full page is too low-res to read\n# small values off a figure; for that use the next recipe instead.\nfor p in pdf_pages(\"paper.pdf\", mode=\"image\",\n                   pages=[h[\"page\"] for h in r[\"hits\"]], dpi=150):\n    import shutil; shutil.copy(p[\"image_path\"], f\".\u002Fhit_p{p['page']}.png\")\n```\n\n`path` can be a workspace path, a `~\u002F`-expanded path, or an artifact\nversion_id (resolved via `host.artifact_path`).\n\n## Recipe — read a figure in detail\n\nA full rendered page is too low-resolution to read small axis labels,\nlegend text, or values off a dense multi-panel figure — the attach\npipeline downsamples everything to ≤1568px, so the figure region ends up\nat a few hundred pixels no matter what DPI you render at. **Render the\npage at high DPI, then crop the figure before attaching.** The crop is\nboth more legible *and* cheaper (a figure crop is ~400 vision tokens vs\n~1,600 for the full page).\n\n```python\n# 1. Find the figure's page (pdf_scan on the caption text, or pdf_extract\n#    with {\"figures\": [...]}, or you already know it).\n# 2. Render that page at dpi=200 — high enough to crop into. The render\n#    lands in .cache\u002F so it is NOT auto-attached.\np = pdf_pages(\"paper.pdf\", mode=\"image\", pages=[5], dpi=200)[0]\n# 3. Attach the full page once to locate the figure, OR go straight to a\n#    crop if the caption\u002Fposition tells you where it is:\nhost.view_image(p[\"image_path\"], crop=(x0, y0, x1, y1))  # pixels in the dpi=200 render\n# → writes the crop to cwd; it auto-attaches at full resolution next turn.\n```\n\nCrop to one panel at a time for multi-panel figures. Always crop from\nthe `.cache\u002F` render, not from a previously attached (downsampled) view.\n\n## Recipe — map every page\n\nFor documents with no useful section structure (meeting transcripts,\nslide exports, multi-document compilations), get a 2-sentence summary\nof every page instead of a ranked subset:\n\n```python\nm = pdf_map(\"transcript.pdf\")\nfor p in m[\"pages\"]:\n    print(f\"p{p['page']}: {p['text']}\")\n```\n\nThen pick pages and `read_file(pages=[...])`. 100 pages → ~10K tokens in\ncontext (vs ~400K if you embedded the whole PDF as vision, or ~90K as\nextracted text). Nothing is filtered out, so there's no chance the\nrelevant page was missed. Measured: ~100 output tokens\u002Fpage.\n\n## Recipe — structured extraction\n\nPull the same fields from every page in parallel:\n\n```python\nrows = pdf_extract(\"paper.pdf\", {\n    \"type\": \"object\",\n    \"properties\": {\n        \"figures\": {\"type\": \"array\", \"items\": {\"type\": \"object\",\n            \"properties\": {\"label\": {\"type\": \"string\"},\n                           \"caption\": {\"type\": \"string\"}}}},\n    },\n    \"required\": [\"figures\"],\n})\nfigs = [(r[\"page\"], f) for r in rows for f in (r[\"data\"] or {}).get(\"figures\", [])]\n```\n\n**Schemas that work well**: `{figures:[{label,caption}]}` (figure index),\n`{citations:[str]}` (bibliography — follow with one `host.llm()` call\nto dedupe inline-marker noise), `{section_headings:[str]}` (TOC — this\nis what `pdf_outline` does internally), `{gene_symbols:[str]}` (entity\nlists), `{rows:[{col1,col2,...}]}` (table rows — whitespace-aligned\ntables in the text layer parse cleanly; for rendered\u002Fimage tables pass\n`mode=\"image\"`).\n\n**Put the inclusion criterion in the schema's `description`** — e.g.\n`\"datasets on which results are actually reported on this page (in a\ntable or the text), not datasets merely cited or mentioned\"`. The\nper-page model sees the full page and applies the criterion for you. If\nyou leave it out you'll end up re-reading pages afterwards to apply it\nyourself, which costs more than the sweep did.\n\n**Schemas that don't**: anything requiring judgment about \"key\" vs \"all\"\n(`{key_claims:[str]}` returns ~10\u002Fpage, unusable). Per-page extraction\nis recall-complete but precision-noisy. For ≲300 raw names, print the\nsorted unique names with their page lists and dedupe\u002Fnormalize them\nyourself while writing the final answer — you have the whole list in\ncontext, and a `host.llm` reduce call just hands you back a blob you\nthen have to parse. Reach for an LLM reduce only above that.\n\n**The sweep already read every page.** Don't follow it with\n`read_file(pages=[...])` vision loads to \"check for missed items\" or to\nre-examine specific hits — that re-spends the tokens the sweep just\nsaved. **Call budget for an exhaustive-extraction job: 2 kernel calls**\n— (1) the sweep, printing unique names + page lists; (2) *one* batched\ncheck that prints the cached text of every page you have a doubt about,\ncollected up front:\n\n```python\ndoubtful = {\"DatasetA\", \"DatasetB\", \"DatasetC\"}   # decide ALL of them first\npages = sorted({p for n in doubtful for p in name_pages[n]})\nfor p in pdf_pages(\"paper.pdf\", pages=pages):\n    print(f\"\\n── page {p['page']} ──\\n{p['text']}\")\n```\n\nThen write the answer. The parse is cached so this is instant and free,\nthe text persists in your context (unlike `read_file` vision pages,\nwhich vanish after one turn), and it's ~5× fewer tokens per page than\nan image. If you're about to make a third kernel call to check one more\nitem, you're doing it wrong — fold it into call 2 or let it go.\n\n## When NOT to use this skill\n\n- **A single lookup of 1–4 pages you will quote immediately**:\n  `read_file(file_path=..., pages=[...])` is fine — but only if you write\n  your answer on the very next turn, because the attached pages do not\n  survive past it.\n- **Literal keyword search**: grep the extracted text —\n  `[p for p in pdf_pages(path) if \"Harmony\" in p[\"text\"]]`. `pdf_scan`\n  earns its cost on *semantic* queries (\"where are the limitations\n  discussed\") that keywords won't find.\n\n## Mode (scanned PDFs)\n\nAll helpers default to `mode=\"auto\"`: try text extraction; if pages\naverage \u003C 80 extractable characters (scanned document, image-only slide\nexport), re-parse with page rendering so the LLM sees the image. You\ndon't need to set this. `\"text\"`\u002F`\"image\"` force one or the other.\n\n## Cost & budget\n\n~800 input + 100 output tokens\u002Fpage in text mode. The sweep helpers in\n`kernel.py` pin `PDF_DEFAULT_MODEL = \"claude-haiku-4-5\"` explicitly on\nevery request — explicit `model=` wins over the kernel default, so the\nsweep is haiku-priced (≈ $0.001–0.003\u002Fpage depending on page length)\nregardless of deployment config. (Ad-hoc `host.llm()` calls you make\nyourself are different: bare calls use the Haiku-class kernel default\nvia `[llm] kernel_default_model` — check `help(host.llm)` if cost\nmatters there.) Don't\npass a heavier `model=` for extraction; heavier models cost 10-30×\nmore and add nothing to recall-complete per-page pulls. For a very\nlarge document you can\nscan a subset via `pages=range(1, n, 3)`, but stride sampling **can\nmiss** a narrow relevant span between unrelated neighbors; prefer\n`pdf_outline` → read the section you want when the document has\nstructure.\n\n## Caching\n\n`pdf_pages` caches on `(abs_path, mtime, mode, dpi)` — a second\n`pdf_scan`\u002F`pdf_map` with a different `query`\u002F`prompt` on the same file\nskips re-parsing and re-rendering. Page renders land in\n`.\u002F.cache\u002Fpdf-explore\u002F{sha8}-{mtime}\u002Fdpi{N}\u002Fp{NNN}.png` (under\n`.cache\u002F` so they do NOT auto-attach — copy ones you want seen to\n`.\u002Fhit_pN.png`).\n","# PDF Explore — navigate a PDF too big to embed\n\nA 50-page PDF via `read_file` is ~200K tokens in context, and pages\nloaded with `read_file(pages=[...])` are dropped from context after one\nturn — so multi-section synthesis turns into re-reading the same pages\nover and over. And when the answer is \"every page\" (list all the\ndatasets \u002F citations \u002F figures \u002F benchmarks mentioned anywhere in this\ndocument), reading the whole thing page-by-page is the expensive way to\nget it. This skill parses the PDF once in the Python kernel and runs one\ncheap haiku call per page, **in parallel**, so you load only what\nmatters — or sweep every page without ever putting the pages in your own\ncontext.\n\n## Which helper\n\n| | when | returns |\n|---|---|---|\n| **`read_file(pages=[...])`** (no skill) | a single lookup of 1–4 pages you will quote in your *very next* response | pages as vision blocks — **dropped from context after one turn** |\n| **`pdf_pages(path, pages=[...], mode=\"text\")`** | you need several pages\u002Fsections *at the same time* — summaries, comparisons, anything where the answer draws on more than one range | `[{page, text}, ...]` — write to a file then `read_file`; stays in context like any tool output |\n| **`pdf_outline(path)`** | structured doc (paper, report, book) | `[{page, heading, level}, ...]` — a TOC |\n| **`pdf_scan(path, query, top_k)`** | semantic question, want the K most relevant pages | `{hits: [{page, relevance, summary, text}], n_scanned, usage}` |\n| **`pdf_extract(path, schema)`** | **exhaustive list of X across the whole doc** (datasets, citations, figures, table rows, entities) | `[{page, data, usage}, ...]` — then flatten + dedupe |\n| **`pdf_map(path, prompt)`** | unstructured doc (transcript, slide dump, compilation), or a free-text question of every page | `{pages: [{page, text}], n_pages, usage}` — every page's answer to `prompt` |\n| **`pdf_pages(mode=\"image\", dpi=200)` → `host.view_image(img, crop=…)`** | read a small value, axis label, or legend off a **figure** | a high-res crop of the figure, auto-attached as vision |\n\nLoading this skill auto-injects these into the Python kernel (from\n`kernel.py`); call directly, no import. Don't check for or install\n`pypdfium2` first — host-managed installs seed it in the default `python`\nenvironment, and if it's genuinely missing the first call raises with an\ninstall recipe (on platform-managed hosts the default env rejects\ninstalls — if the recipe's `manage_packages` call errors, create a domain\nenv with pypdfium2 **and pillow** and re-run there; pillow does the PNG\nencoding for `mode=\"image\"` and is not pulled in by the pypdfium2 wheel).\nGo straight to the helper call.\n\nNote: the default backend is pypdfium2 (Google PDFium; permissive\nApache-2.0\u002FBSD-3-Clause). PyMuPDF is honored as a fallback if already\ninstalled, but it is AGPL-3.0-licensed (commercial licenses available from\nArtifex): if you embed it in a network-accessible service, AGPL's\nsource-sharing terms apply to that service.\n\n## Recipe — pull the sections you need as persistent text (synthesis)\n\nFor \"summarize the methods\" \u002F \"compare section 3 and section 5\" \u002F anything\nwhere the answer draws on several page ranges at once, do **not** read the\nranges one `read_file` call at a time — each call's pages are dropped from\ncontext before you finish, and you will loop re-reading them. Pull **all**\nthe pages you need in **one** python call, write them to a file, then\n`read_file` that:\n\n```python\nwanted = [5, 21,22,23,24,25, 62,63,64, 124,125,126]  # from pdf_outline\nwith open(\"sections.txt\", \"w\") as f:\n    for p in pdf_pages(\"paper.pdf\", pages=wanted, mode=\"text\"):\n        f.write(f\"\\n── page {p['page']} ──\\n{p['text']}\")\nimport os; print(f\"wrote {os.path.getsize('sections.txt'):,} bytes\")\n```\n\nThen `read_file(file_path=\"sections.txt\")` — or with `offset=`\u002F`limit=` if\nit's over 100KB — and write the answer from that. **Don't `print()` the\npage text directly**: any python output over ~16KB is spilled to disk and\nyou'll be told to `read_file` it anyway, so printing a full chapter costs\ntwo tool calls where writing + reading costs the same two without the\nwasted preview. (For a quick look at ≤5 pages, printing is fine.)\n\n~800 tokens\u002Fpage of text vs ~4,000 tokens\u002Fpage as vision — and you only pay\nit once. Find the page numbers from `pdf_outline` (below) or the paper's\nown table of contents first.\n\n## Recipe — navigate by outline (try this first)\n\n```python\nfor e in pdf_outline(\"report.pdf\"):\n    print(f\"p{e['page']:>3} {'  ' * (e['level'] - 1)}{e['heading']}\")\n# → then read_file(file_path=\"report.pdf\", pages=[the section you want])\n```\n\nFree and instant when the PDF has an embedded outline (most\nLaTeX-compiled papers do). Falls back to a single batched LLM call on\ntext-layer ≤150pp docs (~$0.001-0.003 total), or per-page LLM heading\nextraction on scanned\u002F>150pp (~$0.002\u002Fpage). For a semantic question the\noutline doesn't obviously answer (\"where do they discuss\nlimitations\"), fall through to `pdf_scan`.\n\n## Recipe — find the pages relevant to a query\n\n```python\nr = pdf_scan(\"paper.pdf\", query=\"batch-effect correction methods\", top_k=5)\nfor h in r[\"hits\"]:\n    print(f\"p{h['page']}  {h['relevance']:.2f}  {h['summary'] or h['text'][:100]}\")\nprint(f\"[{r['n_scanned']} pages scanned, \"\n      f\"{r['usage']['input_tokens']} in + {r['usage']['output_tokens']} out]\")\n```\n\n(`summary` is populated only when `strategy=\"fanout\"` — the default\n`\"auto\"` uses single-call comparative ranking on text-mode docs ≤150pp,\nwhich is ~3× cheaper and ranks better but doesn't generate summaries.\nPass `strategy=\"fanout\"` if you want them.)\n\nThen load only those:\n\n```python\n# Either: call read_file from the harness (attaches as vision)\n#   read_file(file_path=\"paper.pdf\", pages=[h[\"page\"] for h in r[\"hits\"]])\n# Or: print the text right here\nfor h in r[\"hits\"]:\n    print(f\"\\n── page {h['page']} ──\\n{h['text'][:2000]}\")\n# Or: render hit pages to cwd (PNGs auto-attach as vision next turn).\n# Fine for layout\u002Fskimming — but a full page is too low-res to read\n# small values off a figure; for that use the next recipe instead.\nfor p in pdf_pages(\"paper.pdf\", mode=\"image\",\n                   pages=[h[\"page\"] for h in r[\"hits\"]], dpi=150):\n    import shutil; shutil.copy(p[\"image_path\"], f\".\u002Fhit_p{p['page']}.png\")\n```\n\n`path` can be a workspace path, a `~\u002F`-expanded path, or an artifact\nversion_id (resolved via `host.artifact_path`).\n\n## Recipe — read a figure in detail\n\nA full rendered page is too low-resolution to read small axis labels,\nlegend text, or values off a dense multi-panel figure — the attach\npipeline downsamples everything to ≤1568px, so the figure region ends up\nat a few hundred pixels no matter what DPI you render at. **Render the\npage at high DPI, then crop the figure before attaching.** The crop is\nboth more legible *and* cheaper (a figure crop is ~400 vision tokens vs\n~1,600 for the full page).\n\n```python\n# 1. Find the figure's page (pdf_scan on the caption text, or pdf_extract\n#    with {\"figures\": [...]}, or you already know it).\n# 2. Render that page at dpi=200 — high enough to crop into. The render\n#    lands in .cache\u002F so it is NOT auto-attached.\np = pdf_pages(\"paper.pdf\", mode=\"image\", pages=[5], dpi=200)[0]\n# 3. Attach the full page once to locate the figure, OR go straight to a\n#    crop if the caption\u002Fposition tells you where it is:\nhost.view_image(p[\"image_path\"], crop=(x0, y0, x1, y1))  # pixels in the dpi=200 render\n# → writes the crop to cwd; it auto-attaches at full resolution next turn.\n```\n\nCrop to one panel at a time for multi-panel figures. Always crop from\nthe `.cache\u002F` render, not from a previously attached (downsampled) view.\n\n## Recipe — map every page\n\nFor documents with no useful section structure (meeting transcripts,\nslide exports, multi-document compilations), get a 2-sentence summary\nof every page instead of a ranked subset:\n\n```python\nm = pdf_map(\"transcript.pdf\")\nfor p in m[\"pages\"]:\n    print(f\"p{p['page']}: {p['text']}\")\n```\n\nThen pick pages and `read_file(pages=[...])`. 100 pages → ~10K tokens in\ncontext (vs ~400K if you embedded the whole PDF as vision, or ~90K as\nextracted text). Nothing is filtered out, so there's no chance the\nrelevant page was missed. Measured: ~100 output tokens\u002Fpage.\n\n## Recipe — structured extraction\n\nPull the same fields from every page in parallel:\n\n```python\nrows = pdf_extract(\"paper.pdf\", {\n    \"type\": \"object\",\n    \"properties\": {\n        \"figures\": {\"type\": \"array\", \"items\": {\"type\": \"object\",\n            \"properties\": {\"label\": {\"type\": \"string\"},\n                           \"caption\": {\"type\": \"string\"}}}},\n    },\n    \"required\": [\"figures\"],\n})\nfigs = [(r[\"page\"], f) for r in rows for f in (r[\"data\"] or {}).get(\"figures\", [])]\n```\n\n**Schemas that work well**: `{figures:[{label,caption}]}` (figure index),\n`{citations:[str]}` (bibliography — follow with one `host.llm()` call\nto dedupe inline-marker noise), `{section_headings:[str]}` (TOC — this\nis what `pdf_outline` does internally), `{gene_symbols:[str]}` (entity\nlists), `{rows:[{col1,col2,...}]}` (table rows — whitespace-aligned\ntables in the text layer parse cleanly; for rendered\u002Fimage tables pass\n`mode=\"image\"`).\n\n**Put the inclusion criterion in the schema's `description`** — e.g.\n`\"datasets on which results are actually reported on this page (in a\ntable or the text), not datasets merely cited or mentioned\"`. The\nper-page model sees the full page and applies the criterion for you. If\nyou leave it out you'll end up re-reading pages afterwards to apply it\nyourself, which costs more than the sweep did.\n\n**Schemas that don't**: anything requiring judgment about \"key\" vs \"all\"\n(`{key_claims:[str]}` returns ~10\u002Fpage, unusable). Per-page extraction\nis recall-complete but precision-noisy. For ≲300 raw names, print the\nsorted unique names with their page lists and dedupe\u002Fnormalize them\nyourself while writing the final answer — you have the whole list in\ncontext, and a `host.llm` reduce call just hands you back a blob you\nthen have to parse. Reach for an LLM reduce only above that.\n\n**The sweep already read every page.** Don't follow it with\n`read_file(pages=[...])` vision loads to \"check for missed items\" or to\nre-examine specific hits — that re-spends the tokens the sweep just\nsaved. **Call budget for an exhaustive-extraction job: 2 kernel calls**\n— (1) the sweep, printing unique names + page lists; (2) *one* batched\ncheck that prints the cached text of every page you have a doubt about,\ncollected up front:\n\n```python\ndoubtful = {\"DatasetA\", \"DatasetB\", \"DatasetC\"}   # decide ALL of them first\npages = sorted({p for n in doubtful for p in name_pages[n]})\nfor p in pdf_pages(\"paper.pdf\", pages=pages):\n    print(f\"\\n── page {p['page']} ──\\n{p['text']}\")\n```\n\nThen write the answer. The parse is cached so this is instant and free,\nthe text persists in your context (unlike `read_file` vision pages,\nwhich vanish after one turn), and it's ~5× fewer tokens per page than\nan image. If you're about to make a third kernel call to check one more\nitem, you're doing it wrong — fold it into call 2 or let it go.\n\n## When NOT to use this skill\n\n- **A single lookup of 1–4 pages you will quote immediately**:\n  `read_file(file_path=..., pages=[...])` is fine — but only if you write\n  your answer on the very next turn, because the attached pages do not\n  survive past it.\n- **Literal keyword search**: grep the extracted text —\n  `[p for p in pdf_pages(path) if \"Harmony\" in p[\"text\"]]`. `pdf_scan`\n  earns its cost on *semantic* queries (\"where are the limitations\n  discussed\") that keywords won't find.\n\n## Mode (scanned PDFs)\n\nAll helpers default to `mode=\"auto\"`: try text extraction; if pages\naverage \u003C 80 extractable characters (scanned document, image-only slide\nexport), re-parse with page rendering so the LLM sees the image. You\ndon't need to set this. `\"text\"`\u002F`\"image\"` force one or the other.\n\n## Cost & budget\n\n~800 input + 100 output tokens\u002Fpage in text mode. The sweep helpers in\n`kernel.py` pin `PDF_DEFAULT_MODEL = \"claude-haiku-4-5\"` explicitly on\nevery request — explicit `model=` wins over the kernel default, so the\nsweep is haiku-priced (≈ $0.001–0.003\u002Fpage depending on page length)\nregardless of deployment config. (Ad-hoc `host.llm()` calls you make\nyourself are different: bare calls use the Haiku-class kernel default\nvia `[llm] kernel_default_model` — check `help(host.llm)` if cost\nmatters there.) Don't\npass a heavier `model=` for extraction; heavier models cost 10-30×\nmore and add nothing to recall-complete per-page pulls. For a very\nlarge document you can\nscan a subset via `pages=range(1, n, 3)`, but stride sampling **can\nmiss** a narrow relevant span between unrelated neighbors; prefer\n`pdf_outline` → read the section you want when the document has\nstructure.\n\n## Caching\n\n`pdf_pages` caches on `(abs_path, mtime, mode, dpi)` — a second\n`pdf_scan`\u002F`pdf_map` with a different `query`\u002F`prompt` on the same file\nskips re-parsing and re-rendering. Page renders land in\n`.\u002F.cache\u002Fpdf-explore\u002F{sha8}-{mtime}\u002Fdpi{N}\u002Fp{NNN}.png` (under\n`.cache\u002F` so they do NOT auto-attach — copy ones you want seen to\n`.\u002Fhit_pN.png`).\n",{"name":5,"license":15,"fold_cue":24,"description":7},"instead_of=read_file use=pdf_pages\u002Fpdf_outline\u002Fpdf_scan for multi-page PDF reads — read_file pages drop after one turn","main","e71245365df78e06cd166602744bf2491f79910e","research-skills-hub\u002Fclaude-science-skills\u002Fskills\u002Fpdf-explore",0,"https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS","https:\u002F\u002Fpengqianhan.github.io\u002FAI-Human-Research-OS\u002F","https:\u002F\u002Fgithub.com\u002Fpengqianhan","Ph.D. candidate of The University of Auckland, New Zealand","2026-11-14 18:08:16",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add pengqianhan\u002FAI-Human-Research-OS --skill pdf-explore",{"tool":40,"command":41},"bunx","bunx skills add pengqianhan\u002FAI-Human-Research-OS --skill pdf-explore",{"tool":43,"command":44},"pnpm","pnpm dlx skills add pengqianhan\u002FAI-Human-Research-OS --skill pdf-explore","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fclaude-science-skills\u002Fskills\u002Fpdf-explore\u002FSKILL.md",true,[48],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"kernel.py","SCRIPT","脚本",52606,"https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fclaude-science-skills\u002Fskills\u002Fpdf-explore\u002Fkernel.py",[55,63,70,77,84,91],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":59,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M74MWYTHT498SVMN823896T7","workflow-skill-creator","Distills a completed user workflow or interaction into a reusable agent skill. Use when the user asks to turn their workflow, interaction, or multi-step process into a skill, or when they say \"make this a skill\", \"create a skill from what we just did\", \"package this workflow\" or similar. Do not use for creating skills from scratch without an existing workflow (use a generic skill-creator for that).","MIT","https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fscience-skills\u002Fworkflow_skill_creator\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":59,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M74MWWVCFZ8HQS8840F1V1FT","uv","Checks whether the uv Python package manager is installed and installs it if missing. Ensures uv is on PATH. Use when another skill requires uv as a prerequisite.","https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fscience-skills\u002Fuv\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":59,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M74MWRH5BTSWZ2C5PCTD5FV9","uniprot-database","Access protein metadata, function, taxonomy, and sequences across UniProtKB, UniParc, and UniRef. Use when searching for proteins, mapping identifiers, or retrieving functional annotations and publications. Don't use for sequence alignment, protein folding, or sequence similarity search (use specialized skills for those tasks).","https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fscience-skills\u002Funiprot_database\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":59,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M74MWN1D3ER9F1FZPWH8HQC1","unibind-database","Queries the UniBind database for experimentally validated transcription factor (TF) binding sites. Use when retrieving direct TF-DNA interaction datasets, downloading binding site coordinates (BED\u002FFASTA) for local analysis, or listing available datasets by species, cell line, or TF name. Don't use to query specific intervals, locations, genes, motif models or expression data.","https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fscience-skills\u002Funibind_database\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":59,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M74MWHHB5QZY3NR2FYA1EK4N","ucsc-conservation-and-tfbs","Fetch Evolutionary Conservation scores (phyloP, phastCons) and Transcription Factor Binding Sites (TFBS) from the UCSC Genome Browser. Use when analyzing whether genomic variants or regions are evolutionarily conserved, functionally important, or bounded by TF regulators across major projects (ENCODE, JASPAR, ReMap).","https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fscience-skills\u002Fucsc_conservation_and_tfbs\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":59,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M74MWERYHSY87P21FDMVE6BA","string-database","Query the STRING database for protein-protein interactions (PPIs), functional enrichment, and homology. Use when the user asks about interactions between specific proteins, interaction evidence, confidence scores, protein interaction partners, or pathway enrichments.","https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fscience-skills\u002Fstring_database\u002FSKILL.md",[],[]]