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/archive228/loopkit/pdf-ingestionnpx skills add Archive228/loopkit --skill pdf-ingestiongit clone --depth 1 https://github.com/Archive228/loopkitWhat 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.00043 | $0.00941 |
| Opus 5 | $0.00022 | $0.00470 |
| Sonnet 5 | $0.00009 | $0.00188 |
| Haiku 4.5 | $0.00004 | $0.00094 |
Grade A, and why
pdf-ingestion 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 2d 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 — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PDF Ingestion
Three ways to feed a PDF to the model, in increasing order of preprocessing:
-
Native PDF input — pass the file directly. Model sees pages as images + extracted text. Best for docs under ~100 pages with meaningful layout (tables, figures, forms). Preserves structure.
-
Text extraction then send —
pdftotext/pypdf/ equivalent, then send the text. Loses layout but cheap. Fine for prose-heavy docs where tables don't matter. -
Extract → chunk → summarize → send — for docs >100 pages or when you'll query the same doc many times. Preprocess once, cache the summary.
Deciding which path
| Doc shape | Path |
|---|---|
| <20 pages, layout matters (report, form, invoice) | Native |
| <20 pages, pure prose (article, memo) | Text extraction |
| 20-100 pages, mixed | Native, but chunk if context tight |
| >100 pages | Extract → chunk → summarize |
| Scanned PDF (no text layer) | OCR first (Tesseract or vision model), then treat as extracted text |
| Tables are the point | Native — text extractors mangle tables |
| Figures/diagrams are the point | Native + explicit "describe the figure on page N" prompt |
Native PDF — the good defaults
- Cache the PDF at a prompt-caching breakpoint (see
prompt-caching). Native PDFs are large — every uncached turn costs full input price on the whole doc. - Ask about specific pages ("summarize section 3.2 on page 14") rather than the whole doc. The model handles targeted queries better than "summarize this 80-page report".
- Follow up with page-cited claims — "on which page does the doc say X?" — as a sanity check the model isn't hallucinating.
Extract-then-send — the traps
pdftotextreading order. Multi-column PDFs come out as interleaved lines. Usepdftotext -layoutfor column preservation, orpdftotext -rawfor straight reading order — pick per doc, don't guess.- Tables become word soup. If tables are load-bearing, native or per-table image extraction. Not text.
- Headers/footers repeat on every page. Strip them before sending, or the model will treat them as content.
- Footnotes drift to random positions in the extracted stream. Filter or accept the noise.
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.
- 2d ago First seen · 60 lines · 43 tokens per session scan A a252437b132d
pdf-ingestion is a skill published in the GitHub repository Archive228/loopkit (753 stars, last pushed 1mo ago), licensed MIT. It adds 43 tokens to every session and 941 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-30.
Other skills, from other repositories
wowerpoint
Turn one document into a kawaii NotebookLM slide-deck PDF. Use for "wowerpoint this", "make a deck about ", "turn this report into slides", or any request to render a single document as shareable narrative slides.
save-as-pdf
Reformat the current HTML design into a paginated, paper-ready PDF. The "Instant" export already gives the user a PDF at the design's native pixel size — this path is for when they want real pages.
当用户需要对PDF文件进行任何操作时,请使用此技能。包括从 PDF 中读取或提取文本/表格、合并多个 PDF、拆分 PDF、旋转页面、添加水印、创建新PDF、填写PDF表单、加密/解密 PDF、提取图片,以及对扫描版 PDF 进行 OCR 使其可搜索。如果用户提到 .pdf 文件或要求生成 PDF,请使用此技能。.
doc-reader
Read any common document/data file — PDF, Word (.docx), Excel (.xlsx/.xls), PowerPoint (.pptx), images (OCR), CSV/TSV, plain text, JSON/YAML/TOML, HTML/XML, and most source-code files. Use the readdocument tool.
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.
brain-pdf
Generate a publication-quality PDF from any brain page via the gstack make-pdf binary. Strips YAML frontmatter, sanitizes emoji, applies running headers and page numbers. Brain page is always the source of truth; PDF is a rendering.