Claude Official Skill: PDF — Read, Create & Edit PDFs
Claude Code skill for PDF files. Read content, extract data, create new PDFs, merge documents, and convert formats. Activates automatically.
What it is
This is an official Claude Code skill from Anthropic's skills repository for working with PDF files. It handles reading content, extracting text and tables, creating new PDFs, merging multiple documents, splitting pages, and converting between formats.
The skill is designed for developers and knowledge workers who use Claude Code to process PDF documents without switching to external tools or writing custom extraction code.
How it saves time or tokens
The skill activates automatically when you ask Claude Code to work with PDF files. Instead of researching which Python library to use (PyPDF2, pdfplumber, reportlab, pypdf), the skill provides Claude Code with the right approach for each task. The estimated token cost is around 500 tokens per invocation.
How to use
- Install via Claude Code:
claude skill install anthropics/skills/pdf
- Or manually copy the SKILL.md content to
.claude/skills/pdf/SKILL.md - Ask Claude Code to work with any PDF file in your project
Example
# Extract text from a PDF (generated by Claude Code with pdf skill)
import pdfplumber
def extract_tables(pdf_path):
tables = []
with pdfplumber.open(pdf_path) as pdf:
for page in pdf.pages:
page_tables = page.extract_tables()
for table in page_tables:
tables.append(table)
return tables
# Create a new PDF with reportlab
from reportlab.lib.pagesizes import letter
from reportlab.pdfgen import canvas
def create_report(output_path, title, content):
c = canvas.Canvas(output_path, pagesize=letter)
c.setFont('Helvetica-Bold', 16)
c.drawString(72, 750, title)
c.setFont('Helvetica', 12)
y = 720
for line in content.split('\n'):
c.drawString(72, y, line)
y -= 15
c.save()
Related on TokRepo
- AI coding tools — development productivity skills
- Documentation tools — document processing resources
Common pitfalls
- Using PyPDF2 for text extraction when pdfplumber gives better results for complex layouts
- Not handling password-protected PDFs, which require the password parameter in open calls
- Attempting to extract text from scanned PDFs without OCR (use pytesseract for those cases)
Frequently Asked Questions
The skill handles reading text and tables, creating new PDFs, merging multiple files, splitting by page ranges, converting to and from other formats, adding watermarks, and extracting embedded images.
For scanned PDFs (image-only), the skill guides Claude Code to use OCR tools like pytesseract. Standard text-based PDFs are processed directly with pdfplumber or pypdf.
The skill chooses the right library for each task: pdfplumber for text and table extraction, reportlab for PDF creation, pypdf for merging and splitting, and pikepdf for low-level PDF manipulation.
Yes. The skill handles encrypted PDFs by passing the password parameter to the PDF library. You provide the password in your prompt, and Claude Code uses it to unlock the file.
Yes. This is an official skill from Anthropic's skills repository, maintained by the Claude Code team. It follows the standard skill format and receives updates alongside Claude Code.
Citations (3)
- Anthropic Skills GitHub— Official skill from Anthropic's skills repository
- pdfplumber GitHub— pdfplumber for PDF text and table extraction
- Anthropic Docs— Claude Code documentation and skills
Related on TokRepo
Source & Thanks
Created by Anthropic. Licensed under MIT. anthropics/skills
Discussion
Related Assets
Claude-Flow — Multi-Agent Orchestration for Claude Code
Layers swarm and hive-mind multi-agent orchestration on top of Claude Code with 64 specialized agents, SQLite memory, and parallel execution.
ccusage — Real-Time Token Cost Tracker for Claude Code
CLI that reads ~/.claude logs and breaks down Claude Code token spend by day, session, and project — pluggable into your statusline.
SuperClaude — Workflow Framework for Claude Code
Adds 16+ slash commands, 9 cognitive personas, and a smart flag system to Claude Code in one pipx install.