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 skills add furkangonel/cowrangler --skill pdf-handlinggit clone --depth 1 https://github.com/furkangonel/cowranglerWrote 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/furkangonel/cowrangler/pdf-handling)<a href="https://agentmods.dev/skills/furkangonel/cowrangler/pdf-handling"><img src="https://agentmods.dev/badge/skills/furkangonel/cowrangler/pdf-handling/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/furkangonel/cowrangler/pdf-handling"><img src="https://agentmods.dev/badge/skills/furkangonel/cowrangler/pdf-handling.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00019 | $0.03004 |
| Opus 5 | $0.00010 | $0.01502 |
| Sonnet 5 | $0.00004 | $0.00601 |
| Haiku 4.5 | $0.00002 | $0.00300 |
Grade B, and why
pdf-handling scanned grade B with 1 finding 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 10d 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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
sudo apt-get install tesseract-ocr # Ubuntu/Debian How it starts
The opening of the file, as written. The whole thing — 399 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PDF Handling SOP
Select the right tool for each PDF job and execute it correctly. Covers text extraction, merging, splitting, HTML-to-PDF conversion, form filling, and scanned PDF (OCR) handling.
When to Use
- User wants to extract text or tables from a PDF
- User wants to merge multiple PDFs into one
- User wants to split a PDF into separate files
- User wants to create a PDF from HTML, Markdown, or data
- User wants to fill fields in a PDF form
- User wants to process a scanned (image-based) PDF
Part 1 — Tool Selection Guide
| Task | Best tool | Install |
|---|---|---|
| Extract text (digital PDF) | pdfplumber |
pip install pdfplumber |
| Extract tables | pdfplumber |
pip install pdfplumber |
| Merge / split / rotate pages | pypdf |
pip install pypdf |
| Create PDF from scratch (programmatic) | reportlab |
pip install reportlab |
| Convert HTML / CSS to PDF | weasyprint |
pip install weasyprint |
| Convert Markdown to PDF | weasyprint + markdown |
pip install weasyprint markdown |
| Fill PDF forms | pypdf or pdfrw |
pip install pypdf |
| Scanned PDF — OCR | pytesseract + pdf2image |
pip install pytesseract pdf2image + system tesseract |
| Encrypt / decrypt | pypdf |
pip install pypdf |
Part 2 — Text Extraction
Digital PDF — Plain Text
import pdfplumber
with pdfplumber.open("document.pdf") as pdf:
for page_num, page in enumerate(pdf.pages, 1):
text = page.extract_text()
if text:
print(f"=== Page {page_num} ===")
print(text)
Extract Text from Specific Pages
with pdfplumber.open("report.pdf") as pdf:
# Pages 2-5 (0-indexed: pages[1:5])
for page in pdf.pages[1:5]:
text = page.extract_text(x_tolerance=3, y_tolerance=3)
print(text)
Extract Text with Coordinates (for layout-aware parsing)
with pdfplumber.open("form.pdf") as pdf:
page = pdf.pages[0]
words = page.extract_words()
for word in words:
print(f" '{word['text']}' at x={word['x0']:.0f}, y={word['top']:.0f}")
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.
- 10d ago First seen · 399 lines · 19 tokens per session scan B 250af50f9186
pdf-handling is a skill published in the GitHub repository furkangonel/cowrangler (2 stars, last pushed 2d ago), licensed MIT. It adds 19 tokens to every session and 3,004 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
document-processing
Use when the deliverable is a document's bytes or its literal content — text/tables out of PDFs, AcroForm fill and flatten, page merge/split, PDF/DOCX from templates, OCR of image-only scans. NOT schema-typed fields pulled from text (that is structured-extraction), NOT signature routing (e-signature) or spreadsheet…
PDF Content Extractor & Annotator
A tool for extracting and analyzing PDF content, including text, tables, metadata, and embedded images. It can also combine PDFs, add annotations, remove some watermarks, and use OCR to read scanned pages.
pdf-toolkit
PDF processing - extract text, merge, split, OCR, info, watermark.
pdf-processing
Extract text from PDFs, fill forms, and merge documents.
document-query
Use when reading, extracting, summarizing, comparing, or answering questions over local or remote documents, code files, PDFs, Office files, HTML/text files, large text-heavy files, and fallback OCR for document images or scans when vision tools are unavailable or insufficient.
document-processing-expert
Read, generate and modify office documents and PDFs from code: PDF extraction and forms, Word documents, Excel workbooks and PowerPoint decks. Use when the user mentions PDF, DOCX, XLSX, PPTX, Word, Excel, PowerPoint or spreadsheets, wants data extracted from documents, needs a report or invoice generated as a file…