Skill by HKUDS
Reads, extracts, creates and edits .pdf files inside an AI assistant's sandbox using preinstalled Python libraries. It suits anyone who uploads a PDF or needs to pull data out of one.
Install pdf
Built from the published package, never by AI.
git clone --depth 1 https://github.com/HKUDS/DeepTutor /tmp/DeepTutor && mkdir -p ~/.claude/skills && cp -r /tmp/DeepTutor/deeptutor/skills/builtin/pdf ~/.claude/skills/pdfRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/HKUDS/DeepTutor /tmp/DeepTutor && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/DeepTutor/deeptutor/skills/builtin/pdf ~/.gemini/antigravity-cli/skills/pdfAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The pdf skill lets an AI assistant read, create and edit .pdf files in a sandbox with shell access. It picks a Python library by task: pdfplumber for extracting text and tables, pypdf for merging, splitting, rotating, cropping, watermarking, encrypting and filling forms, reportlab for creating new PDFs, and PyMuPDF for rendering pages to images.
The skill tells the assistant to run complete Python code, reopen and check the output, and diagnose errors rather than retry the same code. It also covers non-Latin text, which needs a TrueType font on the host, and scanned PDFs, which it says cannot be read because no OCR engine is installed. It is aimed at users who upload a PDF or ask to produce, edit or pull data out of one.
Written from the project's SKILL.md and checked against it.
What it can do
- Extract text and tablesPulls layout-aware text and tables from PDF pages using pdfplumber.
- Export tables to ExcelWrites extracted tables to an .xlsx file with one worksheet per table.
- Merge, split and rotateCombines PDFs, splits them into one file per page and rotates pages with pypdf.
- Crop and metadataChanges page boxes to crop pages and reads document metadata.
- WatermarkStamps one page over every page of a PDF.
- Encrypt and decryptAdds user and owner passwords to a PDF and opens encrypted files with a password.
- Fill formsFills fillable AcroForm fields or overlays text on flat forms.
- Create PDFsBuilds reports and tables with reportlab, including absolute placement of labels.
- Render pages to imagesConverts PDF pages to PNG images at a chosen DPI using PyMuPDF.
What you need
- Sandbox with shell access
- Python with pdfplumber, pypdf, reportlab and PyMuPDF preinstalled
- A TrueType CJK font on the host for Chinese, Japanese or Korean text
Try asking
- Extract the tables from this PDF into an Excel file.
- Merge these two PDF files into one document.
- Fill the name and date fields in this form PDF.
Good to know
- No OCR engine is installed and network is off, so scanned PDFs cannot be read.
- Non-Latin text needs a TrueType CJK font on the host; without one the skill says so instead of producing a PDF.
- Markdown or HTML to PDF needs soffice or pandoc, which is usually absent.
- PyMuPDF does not perform OCR.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: deeptutor/skills/builtin/pdf/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md10 KB
Alternatives to pdf
All alternatives →Creates importable JSON templates for the Obsidian Web Clipper. It is for users who want to clip a site, understand the available variables, or format clipped content.
Harness Creator builds, audits, and improves the instruction and state files that help AI coding agents stay reliable across sessions. It is for developers whose agents forget context, drift out of scope, or claim work is done too early.
Guides an assistant through extracting text from scanned PDFs, photographed pages, and images with OCR. Covers backends, language packs, force-OCR, and performance tuning.
Edits a named local file in place to remove AI-writing patterns, using minimal targeted changes and post-edit verification. Built for users who explicitly ask to clean, rewrite, or humanize that specific file.
Polishes, translates, or tightens existing academic manuscript prose while preserving facts, terminology, and evidence boundaries. Made for researchers revising drafts, including Chinese-to-English translation and LaTeX layout fixes.
Adds PDF form analysis and filling, table extraction, OCR, validation and batch processing to an AI assistant. Aimed at developers who run complex or high-volume PDF workflows.
Compare with obsidian-clipper-template-creator, harness-creator or xberg-extracting-with-ocr
pdf: common questions
Can this skill read scanned PDFs?
No. The source says no OCR engine is installed and network is off, so text in scanned pages cannot be recovered.
Which Python libraries does the pdf skill use?
It uses pdfplumber for text and table extraction, pypdf for page operations and forms, reportlab for creating PDFs, and PyMuPDF (fitz) for rendering pages to images.
Does it handle Chinese, Japanese or Korean text?
Only if the host has a TrueType CJK font. The built-in reportlab fonts have no CJK glyphs, so the skill is told to stop rather than produce empty boxes.
How do I install pdf?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is pdf free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is pdf safe to use?
It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to pdf?
Similar skills: obsidian-clipper-template-creator, harness-creator, xberg-extracting-with-ocr, file-edit-in-place.
