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.
Review-first install path
This asset needs a review step. The copied prompt tells the agent to dry-run, show the writes, then proceed only after confirmation.
npx -y tokrepo@latest install 8341096b-7590-4442-89c1-431ce880d106 --target codexDry-run first, confirm the writes, then run this command.
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 Official Skill: PPTX — PowerPoint Presentations
Claude Code skill for PowerPoint. Create slide decks, add charts, format layouts, import content, and generate presentations from text.
Claude Official Skill: canvas-design
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other s...
Claude Official Skill: DOCX — Word Document Creation
Claude Code skill for Word documents. Create, read, edit .docx files with formatting, tables, images, headers, and styles.
Claude Official Skill: XLSX — Spreadsheet Operations
Claude Code skill for Excel spreadsheets. Create workbooks, write formulas, generate charts, pivot tables, and data analysis.