Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction.
.claude/skills/pdf-processing/SKILL.md| Model | Eval pass | Runs |
|---|---|---|
| gemini-3.6-flashlowest | 94% | 17 |
| gemini-3.1-pro-preview | 100% | 4 |
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | — | — |
| case-16 | ✗→✓ | ▲ Improved | — | — |
| case-01 | ✗→✓ | ▲ Improved | — | — |
| case-07 | ✗→✓ | ▲ Improved | — | — |
| case-09 | ✗→✓ | ▲ Improved | — | — |
Use pdfplumber to extract text from PDFs:
pythonimport pdfplumber with pdfplumber.open("document.pdf") as pdf: text = pdf.pages[0].extract_text() print(text)
Extract tables from PDFs with automatic detection:
pythonimport pdfplumber with pdfplumber.open("report.pdf") as pdf: page = pdf.pages[0] tables = page.extract_tables() for table in tables: for row in table: print(row)
Process multi-page documents efficiently:
pythonimport pdfplumber with pdfplumber.open("document.pdf") as pdf: full_text = "" for page in pdf.pages: full_text += page.extract_text() + "\n\n" print(full_text)
For PDF form filling, see FORMS.md for the complete guide including field analysis and validation.
Combine multiple PDF files:
pythonfrom pypdf import PdfMerger merger = PdfMerger() for pdf in ["file1.pdf", "file2.pdf", "file3.pdf"]: merger.append(pdf) merger.write("merged.pdf") merger.close()
Extract specific pages or ranges:
pythonfrom pypdf import PdfReader, PdfWriter reader = PdfReader("input.pdf") writer = PdfWriter() # Extract pages 2-5 for page_num in range(1, 5): writer.add_page(reader.pages[page_num]) with open("output.pdf", "wb") as output: writer.write(output)
Extract and save text:
pythonimport pdfplumber with pdfplumber.open("input.pdf") as pdf: text = "\n\n".join(page.extract_text() for page in pdf.pages) with open("output.txt", "w") as f: f.write(text)
Extract tables to CSV:
pythonimport pdfplumber import csv with pdfplumber.open("tables.pdf") as pdf: tables = pdf.pages[0].extract_tables() with open("output.csv", "w", newline="") as f: writer = csv.writer(f) for table in tables: writer.writerows(table)
Handle common PDF issues:
pythonimport pdfplumber try: with pdfplumber.open("document.pdf") as pdf: if len(pdf.pages) == 0: print("PDF has no pages") else: text = pdf.pages[0].extract_text() if text is None or text.strip() == "": print("Page contains no extractable text (might be scanned)") else: print(text) except Exception as e: print(f"Error processing PDF: {e}")
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +23 percentage points is the difference between those two pass rates over the 22 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.