Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/bjorn-ingmanson/thefroject-plugins/pdf-handlernpx skills add bjorn-ingmanson/thefroject-plugins --skill pdf-handlergit clone --depth 1 https://github.com/bjorn-ingmanson/thefroject-pluginsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/bjorn-ingmanson/thefroject-plugins/pdf-handler)<a href="https://agentmods.dev/skills/bjorn-ingmanson/thefroject-plugins/pdf-handler"><img src="https://agentmods.dev/badge/skills/bjorn-ingmanson/thefroject-plugins/pdf-handler.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00047 | $0.00674 |
| Opus 5 | $0.00023 | $0.00337 |
| Sonnet 5 | $0.00009 | $0.00135 |
| Haiku 4.5 | $0.00005 | $0.00067 |
Grade A, and why
pdf-handler scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PDF Handler
Read PDF files and surface their content as usable text, tables, or structured data. PDFs are common in finance (statements, audits), operations (contracts, vendor docs), people (offer letters, policies), and research (papers, reports).
Pick the right approach
PDFs vary widely in quality. Pick by source type:
- Text-native PDFs (exports from Word, LaTeX, web):
pdfplumberorPyPDF2for text,pdfplumberfor tables. - Scanned PDFs (images of paper): OCR via
pytesseractafter page-to-image withpdf2image. - Forms / structured PDFs:
pdfplumberextracts cell positions; for AcroForm fields usepypdf.
If no library is available, install pdfplumber (pip install pdfplumber) before proceeding. Tell the user.
Reading
Print a structure overview first:
Pages: 24 | Estimated text: 12,400 words | Tables detected: 3 | Has images: yes
Extract text page by page rather than all at once for long documents — it makes citing page numbers possible later.
Tables
Tables in PDFs are tricky. Use pdfplumber.extract_tables() and verify by printing the first 3 rows of each detected table. If the table looks broken (mis-aligned columns, fragmented cells), tell the user before trying to act on it. Don't pretend a broken table is clean.
Summarizing
For a long PDF the user wants summarized:
- Extract the full text.
- Skim section headings and produce a short outline.
- Ask the user what level of detail they want (executive summary, section-by-section, or topic-focused).
- Cite page numbers in your summary so they can verify.
Output format
For data extraction: save structured output to outputs/<stem>.json or outputs/<stem>.csv.
For summaries: save to outputs/<stem>-summary.md with a "Source" heading at the top citing the PDF path and page count.
For text dumps: save to outputs/<stem>.md so the user can grep it later.
Common mistakes
- Treating a scanned PDF as text-native (you'll get garbage). Detect and route to OCR.
- Losing page numbers when concatenating text — keep them.
- Confidently summarizing a PDF when the OCR is unreliable. Flag uncertain extractions.
- Hallucinating content when the PDF is image-only and OCR failed. Say "I couldn't read this reliably" instead.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 65 lines · 47 tokens per session scan A 7da028928ac3
pdf-handler is a skill published in the GitHub repository bjorn-ingmanson/thefroject-plugins (1 stars, last pushed 1mo ago), licensed MIT. It adds 47 tokens to every session and 674 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
foundry-hosted-agent-validation
Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and azd ai agent run) and after deploying it to an Azure AI Foundry project with azd. Use this when asked to validate a hosted agent sample.
skill-doc-delivery
Convert markdown to DOCX, PPTX, XLSX, PDF office documents — use when you need exportable deliverables.
pdf-extract-create-workflow
Complete PDF lifecycle: download, extract, and generate structured documents with reportlab.
document-direct-python
Use direct Python execution for reliable document creation including spreadsheets, PDFs, and structured reports.
pdf-text-extraction-fallback-85d5ca
Fallback workflow for extracting text from PDFs when readfile returns binary data.
pdf-verification-cli
Verify PDF page count and content using command-line tools when Python libraries unavailable.