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/fastxyz/skill-optimizer/pdf-skillnpx skills add fastxyz/skill-optimizer --skill pdf-skillgit clone --depth 1 https://github.com/fastxyz/skill-optimizerWrote 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/fastxyz/skill-optimizer/pdf-skill)<a href="https://agentmods.dev/skills/fastxyz/skill-optimizer/pdf-skill"><img src="https://agentmods.dev/badge/skills/fastxyz/skill-optimizer/pdf-skill.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.00023 | $0.00560 |
| Opus 5 | $0.00012 | $0.00280 |
| Sonnet 5 | $0.00005 | $0.00112 |
| Haiku 4.5 | $0.00002 | $0.00056 |
Grade A, and why
pdf 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.
What it actually says
PDF Skill Demo
Use Python packages installed in /work/.venv for PDF work. Common choices:
pypdffor reading, splitting, and writing pagespdfplumberfor extracting text from PDFsreportlabfor creating new PDFs
Always inspect the extracted text before writing parsing regexes. Do not guess labels or field formats from the task prompt.
Example text extraction:
from pypdf import PdfReader
reader = PdfReader("input.pdf")
text = "\n".join(page.extract_text() or "" for page in reader.pages)
print(text)
Example structured extraction after inspecting text:
from pypdf import PdfReader
import json
reader = PdfReader("statement.pdf")
text = "\n".join(page.extract_text() or "" for page in reader.pages)
lines = [line.strip() for line in text.splitlines() if line.strip()]
answer = {"riskFlags": []}
for line in lines:
if line.startswith("Account:"):
answer["account"] = line.split(":", 1)[1].strip()
elif line.startswith("Quarter:"):
answer["quarter"] = line.split(":", 1)[1].strip()
elif line.startswith("Total Revenue:"):
raw = line.split(":", 1)[1].strip().replace("$", "").replace(",", "")
answer["totalRevenue"] = float(raw)
elif line.startswith("Risk Flag:"):
answer["riskFlags"].append(line.split(":", 1)[1].strip())
elif line.startswith("Approval Code:"):
answer["approvalCode"] = line.split(":", 1)[1].strip()
with open("answer.json", "w") as output:
json.dump(answer, output, indent=2)
Example page filtering:
from pypdf import PdfReader, PdfWriter
reader = PdfReader("input.pdf")
writer = PdfWriter()
writer.add_page(reader.pages[0])
with open("output.pdf", "wb") as output:
writer.write(output)
Example page filtering by extracted page text:
from pypdf import PdfReader, PdfWriter
reader = PdfReader("customer-packet.pdf")
writer = PdfWriter()
for page in reader.pages:
text = page.extract_text() or ""
if "CUSTOMER COPY" in text and "INTERNAL NOTES" not in text:
writer.add_page(page)
with open("customer-copy.pdf", "wb") as output:
writer.write(output)
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 · 83 lines · 23 tokens per session scan A 07f852b05c31
pdf is a skill published in the GitHub repository fastxyz/skill-optimizer (77 stars, last pushed 3mo ago), licensed MIT. It adds 23 tokens to every session and 560 once invoked, about $0.0001 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-30.
Other skills, from other repositories
PDF manipulation toolkit. Extract text/tables, create PDFs, merge/split, fill forms, for programmatic document processing and analysis.
scan-to-practice
A complete methodology for turning scanned or image-based learning materials into high-quality desktop, web, or mobile practice products. Covers visual transcription, data assembly, answer-key-driven controls and grading, product design, animation, validation, and long-term maintenance. Use when a user wants to…
mineru
An AI-Native skill for parsing PDF / Office / image files into clean Markdown with MinerU — a fast, zero-config document parser for AI agents. Works with NO token via the lightweight Agent API and auto-upgrades to the Standard API (token) for large files, batches, and DOCX/HTML/LaTeX export. Use when: (1) Converting…
mineru
An AI-Native skill for parsing PDF / Office / image files into Markdown with MinerU — a fast, zero-config document parser for AI agents. Works with NO token via the Agent API and auto-upgrades to the Standard API (token) for large files, batches, and DOCX/HTML/LaTeX export. Use when converting PDF/Word/PPT/Excel/image…
file-organizer-by-subject
Organize files into subject folders using keyword-based classification of titles and abstracts, with fallback to full text extraction.
pdf-calendar-extractor
Extract text and identifying colored regions (e.g., rectangles) from a PDF using pdfplumber.