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/hkuds/deeptutor/pdfnpx skills add HKUDS/DeepTutor --skill pdfgit clone --depth 1 https://github.com/HKUDS/DeepTutorWhat 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.00054 | $0.02847 |
| Opus 5 | $0.00027 | $0.01424 |
| Sonnet 5 | $0.00011 | $0.00569 |
| Haiku 4.5 | $0.00005 | $0.00285 |
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 today.
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 — 271 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Work PDFs in the sandbox with preinstalled Python libs. Pick the library by task:
- Extract text/tables/layout/word-coordinates →
pdfplumber; quick raw text or page ops →pypdf. - Merge / split / rotate / crop / watermark / encrypt / metadata →
pypdf. - Fill forms →
pypdf(fillable AcroForm fields) or annotation overlay (flat forms). - Create from scratch →
reportlab.
Write complete Python source and run it via code_execution. Save outputs to the workspace dir.
After execution, refer to the PDF exactly as the Generated artifacts list names it. Use exec only for a genuinely shell-only command; never put this source in python -c or a heredoc.
Preserve an explicitly requested quantity (such as 500 words) and verify the count in the output before finishing. If execution fails or the artifact is missing, diagnose stderr/root cause and change strategy; do not retry identical code or reduce the requested scope without asking.
Extract text and tables (pdfplumber)
import pdfplumber
with pdfplumber.open("in.pdf") as pdf:
for i, page in enumerate(pdf.pages, 1):
print(f"--- page {i} ---")
print(page.extract_text() or "") # layout-aware text
for t in page.extract_tables(): # list of tables; each is list[row]
for row in t:
print(row)
Tables → DataFrame/Excel:
import pdfplumber, pandas as pd
frames = []
with pdfplumber.open("in.pdf") as pdf:
for page in pdf.pages:
for t in page.extract_tables():
if t and len(t) > 1:
frames.append(pd.DataFrame(t[1:], columns=t[0]))
if frames:
pd.concat(frames, ignore_index=True).to_excel("tables.xlsx", index=False)
Messy tables: pass strategies, or crop a region with page.within_bbox((x0, top, x1, bottom)) first:
ts = {
"vertical_strategy": "lines",
"horizontal_strategy": "lines",
"snap_tolerance": 3,
"intersection_tolerance": 15,
}
page.extract_tables(ts)
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.
- today Changed · +1 lines 1452ca537104
- 3d ago First seen · 270 lines · 54 tokens per session scan A 93875b10b751
pdf is a skill published in the GitHub repository HKUDS/DeepTutor (38,271 stars, last pushed today), licensed Apache-2.0. It adds 54 tokens to every session and 2,847 once invoked, about $0.0003 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
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.
add_watermark
通过交互方式给 PDF 添加水印。当用户提到 PDF 互动加水印时使用。.
add_img_water
给 PDF 添加图片水印(logo 等)。当用户提到 PDF 图片水印、PDF 加 logo 时使用。.
add_mark
给 PDF 添加文字水印(简化接口)。当用户提到 PDF 加文字、PDF 标记时使用。.
add_text_watermark
给 PDF 添加文字水印,支持自定义字体、字号、颜色、位置。当用户提到 PDF 文字水印、PDF 加水印 时使用。.
add_watermark_by_parameters
通过参数化方式给 PDF 添加水印。当用户提到参数化 PDF 水印、批量 PDF 水印时使用。.