PDF Reader
Documentspdf-readerPDF Reader is an Agent Skill for documents published in the Kocoro-lab/Kocoro repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Analyze PDF files attached by the user. Activates automatically when user uploads a PDF. Handles both text-based and scanned/image-based PDFs using file_read's built-in PDF rendering.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/Kocoro-lab/Kocoro/blob/HEAD/internal/skills/bundled/skills/pdf-reader/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/pdf-reader, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
PDF Reader
Analyze PDF files using the file_read tool which natively supports PDF rendering.
How file_read handles PDFs
file_readwith a.pdfpath renders pages as images for vision analysis- Parameters:
offset= start page (0-based),limit= max pages (default 5) - Each page is rendered at 144 DPI, resized to 1568px max dimension
- Returns image blocks that you can analyze with vision
Workflow
-
Read the PDF: Call
file_readwith the PDF path. It will render pages as images automatically.{"path": "/path/to/file.pdf"} -
For multi-page PDFs: Read in batches using offset and limit.
{"path": "/path/to/file.pdf", "offset": 5, "limit": 5} -
Analyze the content: The rendered pages come back as images. Describe what you see — text, tables, charts, forms, signatures, stamps, etc.
-
Extract text if needed: For text-heavy PDFs where you need exact content, use bash with python:
python3 -c " import subprocess subprocess.check_call(['pip3', 'install', 'pymupdf', '-q']) import fitz doc = fitz.open('/path/to/file.pdf') for i, page in enumerate(doc): text = page.get_text() if text.strip(): print(f'--- Page {i+1} ---') print(text) "
Tips
- Always start with
file_read— it handles both scanned and text PDFs via vision - For scanned PDFs (image-based), vision analysis through
file_readis the primary method - For text PDFs where exact character-level accuracy matters, supplement with python text extraction
- When summarizing, note the total page count and which pages you've analyzed