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 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/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/fastxyz/skill-optimizer/pdf-skill"><img src="https://agentmods.dev/badge/skills/fastxyz/skill-optimizer/pdf-skill.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.00023 | $0.00560 |
| Opus 5.5 | $0.00009 | $0.00224 |
| Sonnet 5.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 1mo 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.
- 1mo ago First seen · 83 lines · 23 tokens per session scan A 07f852b05c31
pdf is a skill published in the GitHub repository fastxyz/skill-optimizer (81 stars, last pushed 4mo ago), licensed MIT. It adds 23 tokens to every session and 560 once invoked, about $0.0001 per session on Opus 5.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
report-to-pdf
Narrow conversion skill. Invoke only when the user explicitly asks to convert an existing Data Analytics report, dashboard, or inline chart export into a PDF artifact.
pdf-official
Use this skill whenever a PDF file is being produced, opened, transformed, filled, or read. That includes: extracting text or tables from an existing PDF; combining, carving, rotating, cropping, or watermarking pages; composing a fresh PDF (report, invoice, certificate); filling AcroForm fields or overlaying text onto…
Read, extract, split, merge, rotate, watermark, fill, OCR, or create PDF files with verification of page counts and text extraction.
ulw-research
Runs maximum-saturation research with a cooperating team, claim-graph gating, and a cited, QA'd deliverable. Use when the user explicitly asks for research or a deep investigation, including any 'ulw' research wording.
recipe-bulk-download-folder
List and download all files from a Google Drive folder.
figures
Makes publication-quality plots from data with matplotlib, learning curves, scaling laws, benchmark and ablation comparisons, Pareto trade-offs, heatmaps and confusion matrices, sized for the page, vector, with uncertainty shown. Use whenever results are plotted, charted or visualized for a paper, report or answer, or…