processing-pdfs

A document-processing tool for extracting text and tables from PDF files, including invoices, receipts, and reports. PDFs are fixed-layout documents that may contain selectable text or scanned images.

In plain words
What is it for?
Use it to extract text or tables and output them as CSV, JSON, or Markdown, with checks against the original document.
Why use it?
It turns hard-to-edit PDF content into structured data and accounts for cases where text extraction, table alignment, or OCR may be needed.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/ht426/skillseed/processing-pdfs
Any agent
npx skills add ht426/skillseed --skill processing-pdfs
Clone the repo
git clone --depth 1 https://github.com/ht426/skillseed

Made for: Claude Code, Codex.

Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 684 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00096 $0.00684
Opus 5 $0.00048 $0.00342
Sonnet 5 $0.00019 $0.00137
Haiku 4.5 $0.00010 $0.00068

Measured 2d ago against content hash b3f5ac3f1b0d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

processing-pdfs 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.

skills/processing-pdfs/SKILL.md · 55 lines

What it actually says

processing-pdfs

从 PDF 提取表格和文字内容, 输出结构化数据 (CSV / JSON / Markdown)。聚焦发票、收据、报表类 PDF。

何时使用

当用户想: 从 PDF 提取表格、读取 PDF 文字、解析发票/收据、把 PDF 内容转成结构化数据时。

工作流

1. 确认目标

  • PDF 文件路径 (或用户已打开的文件)
  • 要提取什么: 表格 / 纯文字 / 两者
  • 输出格式: CSV / JSON / Markdown / 直接展示

2. 选工具

加载 references/extraction-tools.md 选工具。速记:

  • 表格: pdfplumber —— 表格提取最稳
  • 文字: PyMuPDF (fitz) —— 比 pdfplumber 快数倍
  • 扫描件 / 图片 PDF: 需 OCR (pytesseract + pdf2image)

3. 提取

  • 先探查 PDF: 页数、是否含可选中的文字 (还是扫描件)
  • 表格: pdfplumber.open(path).pages[i].extract_tables()
  • 文字: page.extract_text() 或 PyMuPDF page.get_text()
  • 发票特有: 字段对齐 (发票号、金额、日期、商品明细) 常需按坐标或正则定位

4. 结构化输出

  • 表格 → CSV 或 Markdown 表
  • 发票字段 → JSON (键值对)
  • 多页 → 合并或分页输出, 注明页码

5. 校验

  • 抽查 1-2 页对照原文, 确认无遗漏 / 错位
  • 表格列对齐正确, 数字无串行
  • 扫描件 OCR 结果须人工复核

References 索引

文件 内容 何时加载
references/extraction-tools.md PDF 提取工具用法速查 (pdfplumber / PyMuPDF / OCR) + 发票字段定位技巧 步骤 2 选工具时

重要约束

  • 优先用 pdfplumber 提取表格 (最稳); 纯文字用 PyMuPDF 更快
  • 扫描件 (extract_text 返回空) 必须走 OCR, 不要硬用 extract_text
  • 输出前对照原文抽查, 避免静默错位
  • 路径用正斜杠 (含 Windows)
Files

What ships with it

1 file 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.

Changes

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.

  1. 2d ago First seen · 55 lines · 96 tokens per session scan A b3f5ac3f1b0d

Subscribe to this mod's changes

processing-pdfs is a skill published in the GitHub repository ht426/skillseed (11 stars, last pushed 1mo ago), licensed MIT. It adds 96 tokens to every session and 684 once invoked, about $0.0005 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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens