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/ericrisco/rsc-harness/document-processingnpx skills add ericrisco/rsc-harness --skill document-processinggit clone --depth 1 https://github.com/ericrisco/rsc-harnessWrote 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/ericrisco/rsc-harness/document-processing)<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/document-processing"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/document-processing.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.00084 | $0.02557 |
| Opus 5 | $0.00042 | $0.01278 |
| Sonnet 5 | $0.00017 | $0.00511 |
| Haiku 4.5 | $0.00008 | $0.00256 |
Grade A, and why
document-processing 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 yesterday.
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 — 207 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Document processing
File in, content out — or data in, file out. You open a byte stream (PDF, DOCX, scan) and either pull the content out, or you build a new document from a template and a data dict. That is the whole job: the deliverable is bytes of a document or the literal content of one.
The boundary test, apply it first:
- Deliverable is raw text / Markdown / table cells / a generated file → you are in the right place.
- Deliverable is a typed object matching a schema (
{parties: [...], total: 1234.50}) → that isstructured-extraction. This skill stops at "clean Markdown out of the file"; the schema-constrained extraction runs on that Markdown.
Everything else routes too: signing with an audit trail → e-signature, spreadsheet grids/formulas/XLSX-as-data → spreadsheet-ops, indexing for cross-document Q&A → rag (this skill produces the text rag ingests, it does not index it), downloading the files off a site → data-scraper.
Step 0 — does the PDF have a text layer?
The most expensive mistake in this skill is OCR'ing a PDF that already has a text layer. A digital PDF (exported from Word, a browser, a report tool) carries selectable text — extracting it is free, instant, and lossless. OCR is slow, costs money or GPU, and introduces errors. Never OCR a PDF you can extract.
Check before you pick an engine:
import pdfplumber
with pdfplumber.open("doc.pdf") as pdf:
txt = pdf.pages[0].extract_text() or ""
if len(txt.strip()) > 20:
print("text layer present -> extract directly (pdfplumber / pypdf)")
else:
print("image-only or empty -> this is an OCR job")
If extract_text() returns empty (or near-empty) across the first few pages, it is a scan or image-only PDF and you go to the OCR branch. Symptom from the user's side: "the text copies out as garbage / random symbols" usually means a broken/embedded font, not a missing text layer — try pypdf extraction too before assuming OCR.
Engine selection
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- yesterday First seen · 207 lines · 84 tokens per session scan A c213bfbe95a4
document-processing is a skill published in the GitHub repository ericrisco/rsc-harness (60 stars, last pushed 2d ago), licensed MIT. It adds 84 tokens to every session and 2,557 once invoked, about $0.0004 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-09-03.
Other skills, from other repositories
pdf-handling
PDF creation, text extraction, merging, splitting, and form-filling.
kreuzberg
Extract text, tables, metadata, and images from 91+ document formats (PDF, Office, images, HTML, email, archives, academic) using Kreuzberg. Use when writing code that calls Kreuzberg APIs in Python, Node.js/TypeScript, Rust, or CLI. Covers installation, extraction (sync/async), configuration (OCR, chunking, output…
format-specific-extraction
ZIP archive → Security validation → XML parsing → Text + tables + metadata.
pdf-table-to-excel
TablePack: Convert PDF tables to multi-sheet Excel packages with MinerU — original table screenshots, figures, QC notes, no fabricated data. Path A: existing MinerU users. Path B: run scripts/installmineru. first. REQUIRES multimodal/vision model for QC (open 原始表格/.jpg). Triggers: 转表格, 转excel, 转Excel, PDF表格…
smart-ocr
This skill enables intelligent text extraction from images and scanned documents using PaddleOCR - a leading OCR engine supporting 100+ languages. Extract text from photos, screenshots, scanned PDFs, and handwritten documents with high accuracy.
PDF Content Extractor & Annotator
提取与分析 PDF:文本、表格、元数据、图片;支持合并、注释与去水印,提供 OCR 兜底与综合报告.