pdf-anthropic
Qué hace
Esta skill ayuda a tu agente a trabajar con archivos PDF, desde leerlos y combinarlos hasta rellenar formularios o hacer buscables las páginas escaneadas. Está pensada para cualquiera que maneje PDF con frecuencia.
Cuándo usarla
- ✓Cuando necesitas extraer texto o tablas de un PDF.
- ✓Cuando quieres unir, dividir o girar páginas de PDF.
- ✓Cuando tienes un PDF escaneado y quieres hacerlo buscable con OCR.
Link de la skill
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/document-processing/pdf-anthropic/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Une mis tres PDF en uno solo y gira la segunda página.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente usa bibliotecas de Python y herramientas de línea de comandos para leer, combinar o cambiar el PDF, y sigue una guía aparte para rellenar formularios cuando hace falta.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
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
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
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
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
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
reader = PdfReader("input.pdf")
writer = PdfWriter()
page = reader.pages[0]
page.rotate(90) # Rotate 90 degrees clockwise
writer.add_page(page)
with open("rotated.pdf", "wb") as output:
writer.write(output)
pdfplumber - Text and Table Extraction
Extract Text with Layout
import pdfplumber
with pdfplumber.open("document.pdf") as pdf:
for page in pdf.pages:
text = page.extract_text()
print(text)
Extract Tables
with pdfplumber.open("document.pdf") as pdf:
for i, page in enumerate(pdf.pages):
tables = page.extract_tables()
for j, table in enumerate(tables):
print(f"Table {j+1} on page {i+1}:")
for row in table:
print(row)
Advanced Table Extraction
import pandas as pd
with pdfplumber.open("document.pdf") as pdf:
all_tables = []
for page in pdf.pages:
tables = page.extract_tables()
for table in tables:
if table: # Check if table is not empty
df = pd.DataFrame(table[1:], columns=table[0])
all_tables.append(df)
# Combine all tables
if all_tables:
combined_df = pd.concat(all_tables, ignore_index=True)
combined_df.to_excel("extracted_tables.xlsx", index=False)
reportlab - Create PDFs
Basic PDF Creation
from reportlab.lib.pagesizes import letter
from reportlab.pdfgen import canvas
c = canvas.Canvas("hello.pdf", pagesize=letter)
width, height = letter
# Add text
c.drawString(100, height - 100, "Hello World!")
c.drawString(100, height - 120, "This is a PDF created with reportlab")
# Add a line
c.line(100, height - 140, 400, height - 140)
# Save
c.save()
Create PDF with Multiple Pages
from reportlab.lib.pagesizes import letter
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, PageBreak
from reportlab.lib.styles import getSampleStyleSheet
doc = SimpleDocTemplate("report.pdf", pagesize=letter)
styles = getSampleStyleSheet()
story = []
# Add content
title = Paragraph("Report Title", styles['Title'])
story.append(title)
story.append(Spacer(1, 12))
body = Paragraph("This is the body of the report. " * 20, styles['Normal'])
story.append(body)
story.append(PageBreak())
# Page 2
story.append(Paragraph("Page 2", styles['Heading1']))
story.append(Paragraph("Content for page 2", styles['Normal']))
# Build PDF
doc.build(story)
Subscripts and Superscripts
IMPORTANT: Never use Unicode subscript/superscript characters (₀₁₂₃₄₅₆₇₈₉, ⁰¹²³⁴⁵⁶⁷⁸⁹) in ReportLab PDFs. The built-in fonts do not include these glyphs, causing them to render as solid black boxes.
Instead, use ReportLab's XML markup tags in Paragraph objects:
from reportlab.platypus import Paragraph
from reportlab.lib.styles import getSampleStyleSheet
styles = getSampleStyleSheet()
# Subscripts: use <sub> tag
chemical = Paragraph("H<sub>2</sub>O", styles['Normal'])
# Superscripts: use <super> tag
squared = Paragraph("x<super>2</super> + y<super>2</super>", styles['Normal'])
For canvas-drawn text (not
Preguntas frecuentes
¿Puede rellenar formularios PDF?
Sí. La skill remite a una guía aparte para rellenar formularios PDF.
¿Puede trabajar con PDF escaneados?
Sí. La descripción incluye el OCR de PDF escaneados para hacerlos buscables.
¿Puede añadir marcas de agua o contraseñas?
La descripción menciona marcas de agua, cifrado y descifrado, así que esas tareas están cubiertas.
Detalles
Descripción original del autor
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.
Popularidad
- Estrellas en GitHub
- 33 mil
- Posición en el ranking
- #8818
- Licencia
- MIT
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
owasp-security
33 milEnseña a tu agente la guía de seguridad OWASP para webs, APIs, móviles, contenedores y agentes de IA, para detectar debilidades comunes y sugerir correcciones.
agent-management
33 milPermite que tu agente cree, liste, hiberne, despierte, renombre y elimine agentes de IA con la CLI de AI Maestro, gestionando su ciclo de vida.
agent-messaging
33 milPermite que tu agente envíe, reciba y responda mensajes firmados entre agentes de IA con el Protocolo de Mensajería de Agentes, sobre todo en tu equipo.
docs-search
33 milBusca en la documentación generada del código las firmas de funciones, clases y comentarios, para revisar la API real antes de cambiar nada.
Skills parecidas
feishu-doc
394 milAyuda a tu agente a leer, crear y editar documentos en la nube de Feishu, incluidos texto, imágenes y tablas, usando la herramienta de documentos.
feishu-drive
394 milPermite que tu agente explore, organice y comente archivos de una carpeta de la nube de Feishu que se haya compartido con el bot.
feishu-perm
394 milAyuda a tu agente a revisar y cambiar quién puede acceder a un archivo de Feishu, eligiendo el permiso más pequeño que cumpla tu petición.