PDF Processing
anthropics/skills
Handles everyday PDF jobs in Python and on the command line: extract text and tables, merge, split, rotate, watermark, fill forms, encrypt and OCR.
Gives the agent command-line and Python recipes for reading, creating, merging and splitting PDF files, plus tips for large and scanned documents.
$ npx skills add shareAI-lab/learn-claude-code --skill pdf -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install shareAI-lab/learn-claude-code pdf --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/shareAI-lab/learn-claude-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/pdf .claude/skills/pdf && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "pdf" agent skill from https://github.com/shareAI-lab/learn-claude-code/tree/main/skills/pdf into .claude/skills/pdf/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pdf", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/shareAI-lab/learn-claude-code/tree/main/skills/pdfType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add shareAI-lab/learn-claude-code --skill pdf -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install shareAI-lab/learn-claude-code pdf --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/shareAI-lab/learn-claude-code.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/pdf .agents/skills/pdf && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "pdf" agent skill from https://github.com/shareAI-lab/learn-claude-code/tree/main/skills/pdf into .agents/skills/pdf/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pdf", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add shareAI-lab/learn-claude-code --skill pdf -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install shareAI-lab/learn-claude-code pdf --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/shareAI-lab/learn-claude-code.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/pdf .cursor/skills/pdf && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "pdf" agent skill from https://github.com/shareAI-lab/learn-claude-code/tree/main/skills/pdf into .cursor/skills/pdf/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pdf", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/shareAI-lab/learn-claude-code.git --path skills/pdf--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add shareAI-lab/learn-claude-code --skill pdf -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install shareAI-lab/learn-claude-code pdf --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/shareAI-lab/learn-claude-code.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/pdf .gemini/skills/pdf && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "pdf" agent skill from https://github.com/shareAI-lab/learn-claude-code/tree/main/skills/pdf into .gemini/skills/pdf/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pdf", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install shareAI-lab/learn-claude-code pdfInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add shareAI-lab/learn-claude-code --skill pdf -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/shareAI-lab/learn-claude-code.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/pdf .github/skills/pdf && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "pdf" agent skill from https://github.com/shareAI-lab/learn-claude-code/tree/main/skills/pdf into .github/skills/pdf/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pdf", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add shareAI-lab/learn-claude-code --skill pdf -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install shareAI-lab/learn-claude-code pdf --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/shareAI-lab/learn-claude-code.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/pdf .opencode/skills/pdf && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "pdf" agent skill from https://github.com/shareAI-lab/learn-claude-code/tree/main/skills/pdf into .opencode/skills/pdf/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pdf", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
pdfGives the agent command-line and Python recipes for reading, creating, merging and splitting PDF files, plus tips for large and scanned documents.
The skill covers four jobs. For reading, it prefers pdftotext from poppler-utils for quick extraction and offers PyMuPDF for page-by-page access with metadata. For creating PDFs it suggests pandoc from Markdown, ReportLab for building a file in code, and wkhtmltopdf for HTML. Merging and splitting both use PyMuPDF.
A table lists the libraries and how to install them: PyMuPDF, ReportLab, pdfkit with wkhtmltopdf, and poppler. The best-practice list tells the agent to check that tools are installed before using them, handle character encoding problems, process large PDFs page by page to avoid memory trouble, and fall back to OCR with pytesseract when text extraction from a scanned PDF comes back empty.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit ce8f9f1. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
pippdftotextpython3pandocbrewaptFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
PDF Processing Guide loads about 646 tokens when it runs. Until then it costs about 34 tokens; SKILL.md has 123 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from shareAI-lab/learn-claude-code at commit ce8f9f1, republished under its MIT licence (© shareAI-lab). 123 words, ~646 tokens.
.claude/skills/pdf/SKILL.md (or your agent's skills folder).You now have expertise in PDF manipulation. Follow these workflows:
Option 1: Quick text extraction (preferred)
# Using pdftotext (poppler-utils)
pdftotext input.pdf - # Output to stdout
pdftotext input.pdf output.txt # Output to file
# If pdftotext not available, try:
python3 -c "
import fitz # PyMuPDF
doc = fitz.open('input.pdf')
for page in doc:
print(page.get_text())
"Option 2: Page-by-page with metadata
import fitz # pip install pymupdf
doc = fitz.open("input.pdf")
print(f"Pages: {len(doc)}")
print(f"Metadata: {doc.metadata}")
for i, page in enumerate(doc):
text = page.get_text()
print(f"--- Page {i+1} ---")
print(text)Option 1: From Markdown (recommended)
# Using pandoc
pandoc input.md -o output.pdf
# With custom styling
pandoc input.md -o output.pdf --pdf-engine=xelatex -V geometry:margin=1inOption 2: Programmatically
from reportlab.lib.pagesizes import letter
from reportlab.pdfgen import canvas
c = canvas.Canvas("output.pdf", pagesize=letter)
c.drawString(100, 750, "Hello, PDF!")
c.save()Option 3: From HTML
# Using wkhtmltopdf
wkhtmltopdf input.html output.pdf
# Or with Python
python3 -c "
import pdfkit
pdfkit.from_file('input.html', 'output.pdf')
"import fitz
result = fitz.open()
for pdf_path in ["file1.pdf", "file2.pdf", "file3.pdf"]:
doc = fitz.open(pdf_path)
result.insert_pdf(doc)
result.save("merged.pdf")import fitz
doc = fitz.open("input.pdf")
for i in range(len(doc)):
single = fitz.open()
single.insert_pdf(doc, from_page=i, to_page=i)
single.save(f"page_{i+1}.pdf")| Task | Library | Install |
|---|---|---|
| Read/Write/Merge | PyMuPDF | pip install pymupdf |
| Create from scratch | ReportLab | pip install reportlab |
| HTML to PDF | pdfkit | pip install pdfkit + wkhtmltopdf |
| Text extraction | pdftotext | brew install poppler / apt install poppler-utils |
pytesseract if text extraction returns empty© shareAI-lab, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/pdf of shareAI-lab/learn-claude-code.
Open the folder on GitHubat commit ce8f9f1
We found 6 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 5 other GitHub owners. This page covers the copy in shareAI-lab/learn-claude-code, which our catalogue first saw on October 7, 2026.
PDF Processing Guide next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| PDF Processing Guide this skillshareAI-lab/learn-claude-code | 78k | 5 repos | ~646 | Automated safety check: Pass | MIT | |
| PDF Processinganthropics/skills | 180k | 48 repos | ~2k | Automated safety check: Pass | Proprietary | |
| Docling Document Conversiondocling-project/docling | 69k | — | ~1.1k | Automated safety check: Pass | MIT | |
| PDF Processing with PythonHKUDS/DeepTutor | 41k | — | ~2.7k | Automated safety check: Pass | Apache-2.0 | |
| PDF ToolkitTokenRhythm/opensquilla | 7.1k | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| Huashu Markdown Publishing Pipelinealchaincyf/huashu-md-html | 908 | — | ~4.8k | Automated safety check: Pass | MIT |
anthropics/skills
Handles everyday PDF jobs in Python and on the command line: extract text and tables, merge, split, rotate, watermark, fill forms, encrypt and OCR.
docling-project/docling
Converts PDFs, Office files, HTML, images and other documents into a unified DoclingDocument with Markdown or JSON output, through the docling CLI, Python SDK or a remote service.
HKUDS/DeepTutor
Reads, extracts from, creates, merges, splits, watermarks, encrypts and fills PDF files with pdfplumber, pypdf and reportlab inside a Python sandbox.
TokenRhythm/opensquilla
Deterministic PDF operations through bundled scripts: extract text and tables, merge files or page ranges, split by range, fill form fields and build PDFs from data.
alchaincyf/huashu-md-html
Converts files and web pages into clean Markdown, then turns Markdown into polished HTML, Word, PDF and EPUB using four templates.
XiaomiMiMo/MiMo-Code
Reads, transforms, composes and fills PDFs with Python scripts for extraction, merging, watermarking, encryption, OCR and form filling.
shareAI-lab/learn-claude-code
Design and build AI agents for any domain. An agent skill from shareAI-lab/learn-claude-code.
shareAI-lab/learn-claude-code
Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.
shareAI-lab/learn-claude-code
Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.
Categories
Gives the agent command-line and Python recipes for reading, creating, merging and splitting PDF files, plus tips for large and scanned documents. The skill covers four jobs. For reading, it prefers pdftotext from poppler-utils for quick extraction and offers PyMuPDF for page-by-page access with metadata.
PDF Processing Guide fits situations like: extracting text from a PDF report or paper; converting a Markdown or HTML file into a PDF; merging several PDFs into one or splitting out page ranges; reading a scanned PDF that needs OCR.
Run `npx skills add shareAI-lab/learn-claude-code --skill pdf -a claude-code`. Or copy the skill folder (skills/pdf in shareAI-lab/learn-claude-code) into .claude/skills/pdf in your project. Claude Code loads it when a task matches its description.
Run `npx skills add shareAI-lab/learn-claude-code --skill pdf -a codex`. Or copy the skill folder (skills/pdf in shareAI-lab/learn-claude-code) into .agents/skills/pdf in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add shareAI-lab/learn-claude-code --skill pdf -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pdf, .gemini/skills/pdf, .github/skills/pdf and .opencode/skills/pdf in your project.
Going by SKILL.md and its folder, PDF Processing Guide needs the command-line tools its instructions call (pip, pdftotext, python3, pandoc, brew and apt). Our summary lists: pdftotext from poppler-utils, for text extraction; Python with PyMuPDF, and ReportLab for creating files; pandoc or wkhtmltopdf for Markdown or HTML conversion.
SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
PDF Processing Guide is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 646 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with PDF Processing Guide: PDF Processing (anthropics/skills, 180k stars), Docling Document Conversion (docling-project/docling, 69k stars), PDF Processing with Python (HKUDS/DeepTutor, 41k stars) and PDF Toolkit (TokenRhythm/opensquilla, 7.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
shareAI-lab (a GitHub organization) maintains it in shareAI-lab/learn-claude-code, which has 78,138 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on September 28, 2026.
Source: shareAI-lab/learn-claude-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.