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/mrsgsa/math-modeling-skill-dify/pdfnpx skills add MrSGSA/math-modeling-skill-dify --skill pdfgit clone --depth 1 https://github.com/MrSGSA/math-modeling-skill-difyWrote 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/mrsgsa/math-modeling-skill-dify/pdf)<a href="https://agentmods.dev/skills/mrsgsa/math-modeling-skill-dify/pdf"><img src="https://agentmods.dev/badge/skills/mrsgsa/math-modeling-skill-dify/pdf.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.00055 | $0.02478 |
| Opus 5 | $0.00028 | $0.01239 |
| Sonnet 5 | $0.00011 | $0.00496 |
| Haiku 4.5 | $0.00006 | $0.00248 |
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 4d 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.
This is a copy
69% identical to pdf — 71 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 354 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PDF 工具
许可:专有;完整条款见 LICENSE.txt。
Path safety
- Treat source PDFs as read-only and write new files under the user project directory.
- Do not overwrite an input file unless the user explicitly requests it and a recoverable copy exists.
- Resolve merge, split, OCR, form, watermark, encryption, and extraction targets before writing; never use the Skill directory as an output location.
- After any structural change, reopen the output, verify page count and key content, and visually inspect affected pages when layout matters.
- Relative filenames in the examples are placeholders under
PROJECT_ROOT. Run from the project directory or replace them with resolved project paths; never run an example from the Skill directory when it can create output. - 只有在用户有权访问该 PDF 且主动提供合法密码时才执行解密;不得猜测、破解、绕过或削弱访问控制。密码不得写入日志、文档元数据或默认命令历史。
- 不自动添加、删除或推断 AI 使用披露,也不把模型或厂商名写入默认作者、创建者或文档元数据;是否披露由用户依据适用规则决定。
Overview
This guide covers essential PDF processing operations using Python libraries and command-line tools. For advanced features, JavaScript libraries, and detailed examples, see reference.md. If you need to fill out a PDF form, read forms.md and follow its instructions.
Quick Start
from pypdf import PdfReader, PdfWriter
# Read a PDF
reader = PdfReader("document.pdf")
print(f"Pages: {len(reader.pages)}")
# Extract text
text = ""
for page in reader.pages:
text += page.extract_text()
Python Libraries
pypdf - Basic Operations
Merge PDFs
from pypdf import PdfWriter, PdfReader
writer = PdfWriter()
for pdf_file in ["doc1.pdf", "doc2.pdf", "doc3.pdf"]:
reader = PdfReader(pdf_file)
for page in reader.pages:
writer.add_page(page)
with open("merged.pdf", "wb") as output:
writer.write(output)
Split PDF
from pypdf import PdfReader, PdfWriter
reader = PdfReader("input.pdf")
for i, page in enumerate(reader.pages):
writer = PdfWriter()
writer.add_page(page)
with open(f"page_{i+1}.pdf", "wb") as output:
writer.write(output)
What ships with it
13 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.
- agents/openai.yaml 302 B
- forms.md 13 KB
- LICENSE.txt 1.4 KB
- reference.md 17 KB
- scripts/check_bounding_boxes.py 2.7 KB runs code
- scripts/check_fillable_fields.py 268 B runs code
- scripts/convert_pdf_to_images.py 2.4 KB runs code
- scripts/create_validation_image.py 2.5 KB runs code
- scripts/extract_form_field_info.py 4.8 KB runs code
- scripts/extract_form_structure.py 4.6 KB runs code
- scripts/fill_fillable_fields.py 6.2 KB runs code
- scripts/fill_pdf_form_with_annotations.py 5.8 KB runs code
- scripts/safe_paths.py 2.6 KB runs code
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.
- 4d ago First seen · 354 lines · 55 tokens per session scan A b4eeeaae47bc
pdf is a skill published in the GitHub repository MrSGSA/math-modeling-skill-dify (4 stars, last pushed 1mo ago), licensed MIT. It adds 55 tokens to every session and 2,478 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 69% identical to pdf, differing in 71 lines, and is treated as a copy.
Other skills, from other repositories
markdown-exporter
Convert Markdown text to DOCX, PPTX, XLSX, PDF, PNG, SVG, HTML, IPYNB, MD, CSV, JSON, JSONL, XML files, and extract code blocks in Markdown to Python, Bash,JS and etc files.
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
mineru
PDF / 图片 / 网页高质量解析为 Markdown。三种部署形态全部免费:本地 CLI(开源)、 云 API(注册免费 token + 配额,超额才付费)、网页 flash(零注册,单文件 ≤10MB / ≤20页)。 在中文学术 PDF / 表格 / 公式上识别质量显著高于 pdfplumber。.
Use when EZmathmodel needs to read or convert PDF problem statements, extract text or tables from PDF attachments, summarize reference papers, or fall back when MinerU is unavailable.
user-corpus-explorer
Use near the end of EZmathmodel intake when external/user-corpus contains user-provided papers, notes, PDFs, datasets, or examples that should become a local AGENTS.md reference index.
pydicom
Use pydicom to read, inspect, write, transform, and safely preflight local DICOM datasets and pixel data. Applies to DICOM metadata, transfer syntaxes, compression plugins, frames, private elements, JSON, and bounded de-identification review.