agentleFS
velonxvelonx/agent-skills/skills/pdf-analysis/SKILL.md

pdf-analysis

Skill1 starsChanged 49 days agoMITView on GitHub

Extract text, tables and specific fields from PDF documents and answer questions about them with page references. Use when the user shares a PDF or asks to summarise a report, pull numbers from an invoice or statement, extract tables, or compare PDFs.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    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. Very specific:

    Tables: use page.extract_tables().

    line 40

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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 Analysis

Overview

Turns PDFs into answers: summaries with page citations, structured field extraction, and clean tables — while being explicit about pages that couldn't be read (scans, images, broken encoding).

When to Use

  • "Summarise this PDF", "what does page 12 say about…", "pull the totals from these invoices"
  • Extracting tables to CSV, comparing two versions of a contract or report.

Usage

  1. Inspect first: page count, whether text is extractable, and which pages are scanned images. With Python:
    import pdfplumber
    with pdfplumber.open(path) as pdf:
        for i, page in enumerate(pdf.pages, 1):
            text = page.extract_text() or ""
            print(i, len(text))  # ~0 chars → likely scanned; needs OCR
  2. Extract text per page and keep page numbers attached to every chunk.
  3. Tables: use page.extract_tables(); check headers and merged cells by eye against the page; export to CSV if asked.
  4. Field extraction (invoices, forms, statements): define the fields up front, extract each with its page number, and return JSON. Leave a field null rather than guessing.
  5. Answer or summarise with citations like (p. 7). For long documents summarise per section first, then overall.
  6. Report gaps: list pages that were scanned/unreadable and whether OCR was used.

Examples

Prompt: "Get invoice number, date, vendor and total from these 20 PDFs into a CSV."

See examples/invoice-fields.md for the field spec and output format.

Requirements

  • File access to the PDF. Python with pdfplumber (or pypdf) improves table extraction; OCR needs tesseract.

Limitations

  • Scanned PDFs need OCR, which introduces errors — numbers from OCR should be double-checked.
  • Complex layouts (multi-column, rotated tables) may extract out of order.
  • Password-protected PDFs require the user to unlock them first.

Changelog

  • 1.0.0 — Initial release.

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.