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 Morningstar202604/awesome-skillkit --skill pdf-pipelinegit clone --depth 1 https://github.com/Morningstar202604/awesome-skillkitWrote 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/morningstar202604/awesome-skillkit/pdf-pipeline)<a href="https://agentmods.dev/skills/morningstar202604/awesome-skillkit/pdf-pipeline"><img src="https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/pdf-pipeline/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/morningstar202604/awesome-skillkit/pdf-pipeline"><img src="https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/pdf-pipeline.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.00167 | $0.03276 |
| Opus 5.5 | $0.00067 | $0.01310 |
| Sonnet 5.5 | $0.00033 | $0.00655 |
| Haiku 4.5 | $0.00017 | $0.00328 |
Grade A, and why
pdf-pipeline 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 2mo 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 — 200 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PDF Pipeline(PDF 投稿页级处理流水线)
对已有 PDF 做合并、拆分、取文、改元数据、旋转这五类页级操作。 核心判断:先判定 PDF 类型——文本型直接处理;扫描型(无文本层) 先走 OCR;表单型用字段探测确认结构再动手。
本 skill 供「格式规范卫士」(academic-format-guardian)使用。投稿系统拒收的原因里,PDF 后处理问题占一大类:页数不对、合并顺序错、元数据里留着真名(盲审穿帮)、文件超 20MB、章节顺序乱。本 skill 把 PDF 操作标准化,每步可回查。
这是什么
覆盖六类操作:
- 合并:正文 + supplementary + 推荐审稿人信,按投稿系统要求顺序拼成一个或多个 PDF。
- 拆分:从合订本里抽出某几页做单独材料(如 Graphical Abstract、封面、 highlights 页)。
- 提取:从 PDF 里抽文字/图片/表格页,做引用核对、查重前自查。
- 元数据:查看/写入 PDF 文档属性(Title/Author/Subject/Keywords),盲审前必须清空 Author。
- 匿名化:删除批注、隐藏图层、元数据、链接里的身份信息。
- 压缩:在不糊文字的前提下把文件压到投稿系统限制内。
页级脚本另覆盖旋转(rotate)与表单字段探测(AcroForm probe)。
何时使用
- 投稿前组装最终 PDF 包。
- 盲审版制作(要匿名)。
- 从期刊模板 PDF 里抽某页格式参考。
- 文件超大被投稿系统退回。
- 团队 W5 投稿定稿、W1 Phase 8 交付前。
- 不用于生成 Word 文档、编辑幻灯片或图像处理。
输入清单
| 输入 | 必填 | 说明 |
|---|---|---|
| PDF 文件路径 | 是 | 一个或多个;相对路径基于当前工作目录 |
| 要做的操作 | 是 | merge / split / extract / meta / rotate |
| 目标文件名 | 否 | merge/rotate 必填 --output;meta 缺省原地写 |
| 页码范围 | 否 | 1-3,5 这种 1-based 写法,缺省全部页 |
缺输入时,一次性问齐:
请提供:1) PDF 文件路径;2) 要做什么(合并/拆分/提取文字/改元数据/旋转); 3) 输出文件名;4) 若是拆分或提取:页码范围(缺省全部页)。
前置自检
python3 -c "import pypdf; print('pypdf ok')"
test -f scripts/pdf_ops.py && echo "script ok"
- 两条都通过 → 按工作流执行。
- 第一条报
ModuleNotFoundError→ 提示用户pip install pypdf; 未经同意不要自行安装,此时只输出操作方案不产出文件。 - 第二条失败 → 按
references/sources-and-methodology.md里的 pypdf 文档链接内联等价代码。
工作流
步骤 1:判定 PDF 类型(决定走哪条线)
python3 scripts/pdf_ops.py meta assets/sample.pdf # 随包样例 PDF;你的真实文件换成 input.pdf
预期输出:页数、元数据、form fields: ... 三段。判读:
form fields列出字段 → 表单 PDF:先与用户确认是"只读字段结构" 还是"要填值";填值超出本技能范围,给出字段清单后转告用户用专业 表单工具,不要猜值硬填。- 需要提取文字时先跑步骤 4 的
extract探测文本层。
预期:一段明确结论(文本型 / 扫描型 / 表单型)。 若失败(文件读不开):大概率加密或损坏,见失败处置表。
同时按方法论层盘点所有源 PDF 及页数、是否扫描件、是否加密;扫描件无法直接抽文字,需 OCR,单独标注。
步骤 2:文本型——合并 / 拆分 / 旋转
python3 scripts/pdf_ops.py merge a.pdf b.pdf --output merged.pdf
python3 scripts/pdf_ops.py split merged.pdf --ranges "1-2,3" --outdir split_out
python3 scripts/pdf_ops.py rotate assets/sample.pdf --degrees 90 --pages 1-2 --output rotated.pdf # 随包样例;你的真实场景用上一步的 merged.pdf
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.
- 2mo ago Changed · +33 lines · +65 tokens per session 7bbfd1f9425b
- 2mo ago Changed · +17 lines · -2 tokens per session b1c50b27a920
- 2mo ago Changed 7e120ec5dc27
- 2mo ago First seen · 150 lines · 104 tokens per session scan A b0fa011e3667
pdf-pipeline is a skill published in the GitHub repository Morningstar202604/awesome-skillkit (0 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 167 tokens to every session and 3,276 once invoked, about $0.0007 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-09-19.
pdf-pipeline compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| pdf-pipelineMorningstar202604/awesome-skillkit | Skill | 0 | 2mo ago | Apache-2.0 | A | 167 | Claude Code, Codex |
| pdfmudler/LocalAI | Skill | 51k | today | MIT | A | 35 | Claude Code, Codex |
| pdf-toolkitopensquilla/opensquilla | Skill | 7.2k | 4d ago | Apache-2.0 | A | 127 | Claude Code, Codex |
| extracting-lab-tablesmaziyarpanahi/openmed | Skill | 5.9k | yesterday | Apache-2.0 | A | 210 | Claude Code |
| figuressynthetic-sciences/openscience | Skill | 4.5k | yesterday | Apache-2.0 | A | 99 | Claude Code |
| liteparsesynthetic-sciences/openscience | Skill | 4.5k | yesterday | Apache-2.0 | A | 49 | Claude Code, Codex |
| any-to-pdfcosmicstack-labs/mercury-agent | Skill | 4.1k | today | MIT | A | 66 | Claude Code, Codex |