PDF

This skill provides practical instructions for PDF manipulation using Python libraries (pypdf, pdfplumber, reportlab) and CLI tools (pdftotext, qpdf, pdftk).

Documents & Office FilesOfficial Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add anthropics/skills

Then run /plugin to install the skill set that includes it. In Claude.ai and the Claude app, Anthropic skills are built in: turn them on in Settings → Capabilities.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add anthropics/skills --skill pdf
Manual install
git clone --depth 1 https://github.com/anthropics/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/skills/pdf ~/.claude/skills/pdf

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

What this skill does

Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.

Trigger phrases

Claude loads this skill automatically when you say things like:

“PDF file”“extract PDF”“create PDF”“merge PDF”“split PDF”“PDF form”“fill PDF”

How it works

  1. Use pypdf for merging, splitting, metadata extraction, and page rotation
  2. Use pdfplumber for text and table extraction
  3. Use reportlab for creating PDFs from scratch
  4. Use CLI tools for batch operations and image extraction

When to use it

  • When extracting text or tables from PDFs
  • When creating new PDF documents
  • When merging, splitting, or manipulating PDFs

Best practices

  • Choose the right tool for each task type
  • Use OCR for scanned documents
  • Refer to forms.md for form-filling specifics

From the SKILL.md

# 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.extract_text()
```

## Python Libraries

### pypdf - Basic Operations

#### Merge PDFs
```python
from pypdf import PdfWriter, PdfReader

writer = PdfWriter()
for pdf_file in ["doc1.pdf", "doc2.pdf", "doc3.pdf"]:
    reader = PdfReader(pdf_file)
    for page in reader.pages:
        writer.add_page(page)

with open("merged.pdf", "wb") as output:
    writer.write(output)
```

#### Split PDF
```python
reader = PdfReader("input.pdf")
for i, page in enumerate(reader.pages):
    writer = PdfWriter()
    writer.add_page(page)
    with open(f"page_{i+1}.pdf", "wb") as output:
        writer.write(output)
```

#### Extract Metadata
```python
reader = PdfReader("document.pdf")
meta = reader.metadata
print(f"Title: {meta.title}")
print(f"Author: {meta.author}")
print(f"Subject: {meta.subject}")
print(f"Creator: {meta.creator}")
```

#### Rotate Pages
Read the full skill on GitHub

Details

Skill name
pdf
Path
skills/pdf/SKILL.md

FAQ

What does the PDF skill do?

Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.

How do I install the PDF skill?

Claude Code plugin: /plugin marketplace add anthropics/skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Related skills

Algorithmic Art

anthropics/skills

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

Images, Video & AudioIn 8 lists

Brand Guidelines

anthropics/skills

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

Frontend & DesignIn 8 lists

Canvas Design

anthropics/skills

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 static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

Frontend & DesignIn 8 lists

PPTX

anthropics/skills

Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks.

Documents & Office FilesIn 8 lists

DOCX

anthropics/skills

Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks.

Documents & Office FilesIn 8 lists

XLSX

anthropics/skills

Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas.

Documents & Office FilesIn 8 lists

Browse the most popular Claude skills, all documents & office files skills, or write your own with the skills generator.