pdf

pdf is a skill for Claude Code, Codex from HKUDS/DeepTutor. It costs 54 tokens per session (2,890 once invoked), scanned A, original, Apache-2.0.

A set of instructions for working with PDF files, which are documents designed to keep the same layout across devices and when printed.

In plain words
What is it for?
It helps read text and tables, create PDFs, merge or split pages, rotate, crop, watermark, encrypt, fill forms, and turn pages into images.
Why use it?
It provides a clear way to extract content or change PDF files without choosing tools and procedures from scratch.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps read text and tables, create PDFs, merge or split pages, rotate, crop, watermark, encrypt, fill forms, and turn pages into images.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hkuds/deeptutor/pdf
About the project

DeepTutor is a personalized tutoring system that uses AI agents and learning resources to support ongoing, interactive study. Learners use it for activities such as reading, research, guided courses, and building mastery paths. The catalogue entries provide skills and instructions for working with DeepTutor.

HKUDS/DeepTutor · 41,516 stars · on GitHub · arxiv.org

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.

Any agent
npx skills add HKUDS/DeepTutor --skill pdf
Clone the repo
git clone --depth 1 https://github.com/HKUDS/DeepTutor

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for pdf

README.md
[![agentmods](https://agentmods.dev/badge/skills/hkuds/deeptutor/pdf/github.svg)](https://agentmods.dev/skills/hkuds/deeptutor/pdf)
Your own site
<a href="https://agentmods.dev/skills/hkuds/deeptutor/pdf"><img src="https://agentmods.dev/badge/skills/hkuds/deeptutor/pdf/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.

agentmods 80×15 button for pdf

Your own site · 80×15
<a href="https://agentmods.dev/skills/hkuds/deeptutor/pdf"><img src="https://agentmods.dev/badge/skills/hkuds/deeptutor/pdf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,890 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 26
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.1 $0.00054 $0.02890
Opus 5.5 $0.00022 $0.01156
Sonnet 5.5 $0.00011 $0.00578
Haiku 4.5 $0.00005 $0.00289

Measured 1mo ago against content hash c950efb9d180, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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

deeptutor/skills/builtin/pdf/SKILL.md · 280 lines

How it starts

The opening of the file, as written. The whole thing — 280 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PDF

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.

Use exec with complete Python source (language: python). Prefer creating, reopening, and validating the PDF in one call; later calls can revise the same relative filename. Follow the turn's User workspace instructions for locating inputs, output boundaries, and presenting the finished file. 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 → Excel (one worksheet per table):

import pdfplumber
from openpyxl import Workbook

workbook = Workbook()
workbook.remove(workbook.active)
table_number = 0
with pdfplumber.open("in.pdf") as pdf:
    for page_number, page in enumerate(pdf.pages, 1):
        for table in page.extract_tables():
            if not table:
                continue
            table_number += 1
            sheet = workbook.create_sheet(f"p{page_number}_table{table_number}"[:31])
            for row in table:
                sheet.append([cell or "" for cell in row])
if table_number:
    workbook.save("tables.xlsx")

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)

Read the full file on GitHub · 280 lines

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. 1mo ago Changed · +9 lines c950efb9d180
  2. 1mo ago Changed · +1 lines 1452ca537104
  3. 1mo ago First seen · 270 lines · 54 tokens per session scan A 93875b10b751

Subscribe to this mod's changes

pdf is a skill published in the GitHub repository HKUDS/DeepTutor (41,516 stars, last pushed yesterday), licensed Apache-2.0. It adds 54 tokens to every session and 2,890 once invoked, about $0.0002 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-08-30.

Related

Other skills, from other repositories

markitdown

Converts heterogeneous documents and selected URIs to Markdown with Microsoft MarkItDown for text analysis, search, and LLM/RAG ingestion. Covers safe local conversion, streams, Office/PDF/data formats, batch workflows, plugins, vision OCR, Azure extraction, and the official MCP server.

K-Dense-AI/scientific-agent-skills · 62 tokens

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.

HKUDS/Vibe-Trading · 65 tokens

surfsense-documents

Make or change a Word document (.docx), a PDF, a PowerPoint deck (.pptx) or an Excel workbook (.xlsx) by writing a Python script that surfsenserenderdocument runs, optionally starting from a source's own Word or PowerPoint file. Load it whenever the user asks for one of these, or for a change to one you made.

MODSetter/SurfSense · 80 tokens

surfsense-pdf

Work on PDFs the user has, or PDFs in Studio, without changing them - merge, take out, split, turn or reorder pages, add a watermark, page numbers, a header or a footer, and list or fill a form's fields. Load it whenever the user asks for one of these on a PDF.

MODSetter/SurfSense · 70 tokens

pdf-explore

Use this skill when the user has attached a PDF, paper, report, or other document and the answer needs content from more than one place in it: summarize the methods or any other section, compare sections, find where a topic is discussed, read a value or label off a figure or chart, or find/list/extract every instance…

UnicomAI/wanwu · 192 tokens

smart-data-collection

A workflow for extracting structured information from images and documents such as PDFs, Word files, and spreadsheets, then storing it in a database.

UnicomAI/wanwu · 115 tokens