pdf-reader
Use when reading or extracting content from a PDF file, such as papers and lecture notes.
Skill by victorhg
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/victorhg-pdf-reader
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, writing, research, productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/pdf-reader
What's inside
- Skill name
pdf-reader- Description
- Use when reading or extracting content from a PDF file, such as papers and lecture notes.
- License
- MIT
- Instructions
- 128 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (6)
- SKILL.md
- requirements.txt
- pdf_extract.py · scripts/
- pdf_info.py · scripts/
- pdf_render.py · scripts/
- pdf_search.py · scripts/
SKILL.md (first lines)
# PDF Reader Read and comprehend PDF files, especially academic papers and lecture notes. Uses a hybrid text extraction + vision approach for maximum comprehension of equations, diagrams, and structured content. > **Skill directory:** `SKILL_DIR` below refers to the directory containing this `SKILL.md`. When you read this file, note the path shown by the `read` tool and substitute it for `SKILL_DIR` in every command. ## Setup All scripts use a venv at `SKILL_DIR/.venv` with `pymupdf` installed. If the venv is missing, create it from `requirements.txt`: ```bash python3 -m venv SKILL_DIR/.venv SKILL_DIR/.venv/bin/pip install -r SKILL_DIR/requirements.txt ``` **Python command:** Always invoke scripts with: ``` SKILL_DIR/.venv/bin/python SKILL_DIR/scripts/<script>.py [args] ``` ## Scripts All scripts are in `SKILL_DIR/scripts/`. | Script | Purpose | Key args | |---|---|---| | `scripts/pdf_info.py <path>` | Metadata + per-page analysis (page count, TOC, text density, math density, image count) | — | | `scripts/pdf_extract.py <path> [--pages SPEC]` | Extract text by page | `--pages all\|1-5\|1,3,7\|3` | | `scripts/pdf_render.py <path> [--pages SPEC] [--dpi N]` | Render pages to PNG images in `/tmp/pi-pdf-*/` | `--pages`, `--dpi` (default 150) | | `scripts/pdf_search.py <path> <query> [--context N] [--literal]` | Search text content by regex or literal | `--context` lines (default 3), `--literal` flag | Page specs: `all`, `1-5`, `1,3,7`, `3` (1-indexed, inclusive ranges). ## Strategy: How to Read a PDF ### Step 1: Always Triage First Run `pdf_info.py` on every new PDF before doing anything else. This tells you: - How many pages (determines strategy) - Whether there's a TOC (enables structural navigation) - Per-page math density and image count (identifies which pages need vision) - Per-page text length (spots pages that are mostly diagrams/figures) ### Step 2: Pick a Strategy Based on Size and Content **Short PDFs (≤15 pages)** - Extract all text: `pdf_extract.py <path>` - Render all pages: `pdf_render.py <path>` - Read all rendered images with the `read` tool for full visual comprehension - This gives complete understanding at reasonable token cost **Medium PDFs (15–60 pages)** - Extract all text first (cheap, gives structural overview) - Check `pdf_info.py` output for pages with high `math_density` (>0.02) or `image_count` > 0 or low `text_length` (<100, likely diagram-only pages) - Render only those math/diagram-heavy pages as images - Read those images with `read` for equation and figure comprehension - For the rest, text extraction is sufficient **Long PDFs (60+ pages)** - Extract text for a structural overview — focus on TOC and section headers - Do NOT render all pages (too many tokens) - For targeted questions: use `pdf_search.py` to find relevant pages, then render those - For full comprehension: work section by section, summarizing as you go - Warn the user about scope — offer to focus on specific sections ### Step 3: Targeted Lookups When the user asks about something specific (e.g., "check theorem 3.2", "what's on page 7"): 1. `pdf_search.py <path> "theorem 3.2"` — find the page 2. `pdf_render.py <path> --pages <page>` — render just that page 3. `read` the image — see the actual theorem with proper math rendering 4. If context is needed, extract text from surrounding pages ### Step 4: Visual Reading Guidelines When reading rendered page images: - **150 DPI** (default) is good for most math and text - **200 DPI** if equations are small, dense, or hard to read at 150 - **100 DPI** only for quick structural scanning (saves tokens) - State equations explicitly in your response using LaTeX notation when discussing them - Describe diagrams and figures in detail — the user may not be looking at the PDF simultaneously - Note page numbers when referencing content so the user can find it ### Step 5: What to Watch For - **Pages with low text_length but high image_count**: likely full-page diagrams or figures — always render these - **Pages with high math_density**: equations that text extraction will mangle — always render these - **Pages with decent text but zero math**: text extraction alone is fine, skip rendering - **TOC entries**: use these to navigate structurally rather than reading linearly ## Common Patterns **"Read this PDF" (full document)** ``` 1. pdf_info.py → assess size and content 2. Pick strategy (short/medium/long) 3. Extract text + selectively render 4. Provide summary with key findings ``` **"What does theorem X say?"** ``` 1. pdf_search.py → find the page 2. pdf_render.py → render that page (and maybe the next for proof continuation) 3. Read the image, state the theorem precisely ``` **"Explain the proof on page N"** ``` 1. pdf_render.py --pages N → render the page 2. Read the image for full visual comprehension 3. Also extract text from pages N-1 and N+1 for surrounding context 4. Walk through the proof step by step ``` **"Summarize this paper"** ``` 1. pdf_info.py → get TOC and page count
From victorhg/pi-dev, MIT.
More from victorhg/pi-dev
- 0.529score
pi-extension-development
victorhg
Use when creating or modifying Pi extensions, built-in extension wiring, prompt shims, package scaffolds, package READMEs, or packages/pi-* implementation in…
SkillBFreshness: BClaude Code +9 - 0.524score
code-quality
victorhg
Configure and run the @victorhg/pi-code-quality extension via code-quality.json (metric weights, failBelow gate, complexity threshold, file/directory…
SkillBFreshness: BClaude Code +9 - 0.524score
youtube-transcript
victorhg
Use when the user provides a YouTube URL and needs the spoken content (captions) as text for analysis, summarization, quoting, or search.
SkillBFreshness: BClaude Code +9 - 0.520score
hallmark
victorhg
Anti-AI-slop design skill for greenfield pages, audits, critiques, redesigns, production hardening, deterministic anti-pattern detection, design extraction…
SkillBFreshness: BClaude Code +9 - 0.499score
cost-mode
victorhg
Use when the user wants to reduce token or API cost, asks for concise or cost-conscious responses, or invokes cost mode.
SkillBFreshness: BClaude Code +9 - 0.499score
framed-editor
victorhg
Use when the user asks to frame, box, round, or border the Pi input editor — e.g.
SkillBFreshness: BClaude Code +9 - 0.499score
footer
victorhg
Use when the user asks to customize, change, remove, hide, show, rearrange, or style the Pi status bar / powerdev footer — e.g.
SkillBFreshness: BClaude Code +9 - 0.474score
pi-package-sandbox-test
victorhg
Use when verifying that published my-pi packages install and load for normal users, including Pi package compatibility checks, release validation, sandbox…
SkillCFreshness: CClaude Code +9 - 0.474score
pi-primitive-check
victorhg
Use when evaluating proposed Pi customisation work against built-in Pi primitives before implementation, especially extensions, packages, slash commands, and…
SkillCFreshness: CClaude Code +9 - 0.474score
pi-release-workflow
victorhg
Use when preparing or validating Pi monorepo releases, including Changesets, pnpm lockfile updates, package previews, release-age policy, and installability…
SkillCFreshness: CClaude Code +9 - 0.474score
pi-validation-flow
victorhg
Use when validating Pi monorepo changes after editing TypeScript, Svelte, package manifests, built-in registry, tests, repo tooling, skills, or docs.
SkillCFreshness: CClaude Code +9 - 0.474score
code-quality
victorhg
Use when requesting code analysis, style reviews, linting recommendations, or refactoring suggestions to improve maintainability, performance, and readability.
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 25, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/victorhg/pi-dev
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from victorhg
- 0.529score
pi-extension-development
victorhg
Use when creating or modifying Pi extensions, built-in extension wiring, prompt shims, package scaffolds, package READMEs, or packages/pi-* implementation in…
SkillBFreshness: BClaude Code +9 - 0.524score
youtube-transcript
victorhg
Use when the user provides a YouTube URL and needs the spoken content (captions) as text for analysis, summarization, quoting, or search.
SkillBFreshness: BClaude Code +9 - 0.524score
code-quality
victorhg
Configure and run the @victorhg/pi-code-quality extension via code-quality.json (metric weights, failBelow gate, complexity threshold, file/directory…
SkillBFreshness: BClaude Code +9 - 0.520score
hallmark
victorhg
Anti-AI-slop design skill for greenfield pages, audits, critiques, redesigns, production hardening, deterministic anti-pattern detection, design extraction…
SkillBFreshness: BClaude Code +9 - 0.499score
footer
victorhg
Use when the user asks to customize, change, remove, hide, show, rearrange, or style the Pi status bar / powerdev footer — e.g.
SkillBFreshness: BClaude Code +9 - 0.499score
framed-editor
victorhg
Use when the user asks to frame, box, round, or border the Pi input editor — e.g.
SkillBFreshness: BClaude Code +9
Cite this page
pdf-reader skill. Agent Mart. https://agentmart.dev/skills/victorhg-pdf-reader (last updated 2026-10-24)