Installation
Terminal
git clone --depth 1 https://github.com/anthropics/skills.git /tmp/pdf-src cp -r /tmp/pdf-src/skills/pdf ~/.claude/skills/pdf
Or .claude/skills/pdf to scope it to one repo.
Summary
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.
PDF Processing Guide Overview This guide covers essential PDF processing operations using Python libraries and command-line tools. For advanced features, JavaScript libraries, and detailed examples, see REFERENCE.md. If you need to fill out a PDF form, read FORMS.md and follow its instructions. Quick Start python from pypdf import PdfReader, PdfWriter Read a PDF reader = PdfReader("document.pdf") print(f"Pages: {len(reader.pages)}") Extract text text = "" for page in reader.pages: text += page.extracttext() Python Libraries pypdf - Basic Operations Merge PDFs python from pypdf import PdfWriter, PdfReader writer = PdfWriter() for pdffile in ["doc1.pdf", "doc2.pdf", "doc3.pdf"]: reader = PdfReader(pdffile) for page in reader.pages: writer.addpage(page) with open("merged.pdf", "wb") as output: writer.write(output) Split PDF python reader = PdfReader("input.pdf") for i, page in enumerate(rea…