OpenParable
Skip to content
← Back to skills

PDF Reader

Documents
pdf-reader

PDF 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.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
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_read with a .pdf path 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

  1. Read the PDF: Call file_read with the PDF path. It will render pages as images automatically.

    {"path": "/path/to/file.pdf"}
    
  2. For multi-page PDFs: Read in batches using offset and limit.

    {"path": "/path/to/file.pdf", "offset": 5, "limit": 5}
    
  3. Analyze the content: The rendered pages come back as images. Describe what you see — text, tables, charts, forms, signatures, stamps, etc.

  4. 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_read is 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