agentleFS
shkodnik1917shkodnik1917/claude-brainlab/skills/pdf-reader/SKILL.md

pdf-reader

Skill35 starsChanged 2 months agoMITView on GitHub

Reads and extracts text from PDF files with the local PyMuPDF workflow, including page-level inspection. Use when the user gives a .pdf path and asks to read it, summarize it, extract its text, or find out what a specific page contains.

13 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the extraction script:

    line 27
  2. Very specific:

    If extracted text is empty or garbled, the PDF is likely scanned.

    line 47

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

PDF Reader

Extract text from PDF files using open-source tools. PyMuPDF (fitz) is the primary engine with pypdf as fallback.

When to use

  • User provides a .pdf file path and asks to read or extract its contents
  • User asks to summarize a PDF
  • User asks what a PDF document contains
  • Academic papers, reports, or any PDF documents

When NOT to use

  • URLs pointing to web pages (use defuddle skill instead)
  • Image files (use image analysis tools)
  • Already-extracted text files

Workflow

1. Extract text

Run the extraction script:

python3 ~/.claude/skills/pdf-reader/scripts/extract_pdf.py <pdf_path>

Options:

  • -p, --pages — extract specific pages, e.g. 1-5 or 1,3,7
  • -m, --method — force fitz or pypdf (default: auto)
  • --json — output structured JSON with metadata
  • --metadata-only — print only title, author, page count

2. For large PDFs

Extract in chunks to avoid token overflow:

  • First run with --metadata-only to check page count
  • Then extract page ranges with -p 1-10, -p 11-20, etc.

3. For scanned PDFs (image-based)

If extracted text is empty or garbled, the PDF is likely scanned. Inform the user that OCR is needed. Consider suggesting marker or ocrmypdf as next steps.

Quality notes

  • PyMuPDF preserves font size and bold formatting as markdown headers and bold text
  • pypdf is the fallback and produces plain text only
  • Both handle multi-column layouts as single-column output (reading order)
  • Tables are extracted as plain text, not as structured tables

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.