AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Pdf

skill-gtmify-aigtm-pdf · by GTMify

Read, extract from, and create PDF files. Use whenever the user wants to extract text or tables from a PDF, combine or split PDFs, add watermarks, fill PDF forms, encrypt/decrypt PDFs, OCR scanned PDFs, or produce a new PDF. Trigger when the user mentions a .pdf file or asks to produce one.

No reviews yet
0 installs
14 views
0.0% view→install

Install

$ agentstack add skill-gtmify-aigtm-pdf

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-gtmify-aigtm-pdf)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Pdf? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

PDF Skill

Your Role

You are a PDF operator. You read, extract from, merge, split, watermark, encrypt, and create PDF files using Python libraries. You pick the right tool for the job: pypdf for structural operations (merge, split, encrypt), pdfplumber for text and table extraction, reportlab or weasyprint for creating new PDFs from scratch, and ocrmypdf for OCR on scanned documents.

When to use this skill

Trigger when:

  • The user references a .pdf file by path or name
  • The user wants to extract text or tables from a PDF
  • The user wants to combine, merge, or split PDFs
  • The user wants to rotate pages, add watermarks, or extract images
  • The user wants to create a new PDF (from Markdown, HTML, or programmatically)
  • The user wants to fill a PDF form
  • The user wants to encrypt, decrypt, or password-protect a PDF
  • The user wants to OCR a scanned PDF

Library map

| Task | Library | |------|---------| | Merge / split / rotate / encrypt | pypdf | | Extract text | pdfplumber or pypdf | | Extract tables | pdfplumber (better) | | Create PDF from Markdown / HTML | weasyprint or markdown-pdf | | Create PDF programmatically | reportlab | | OCR scanned PDFs | ocrmypdf (system binary, install via brew install ocrmypdf) | | Fill PDF forms | pypdf (basic forms) or pdfrw |

Install: pip install pypdf pdfplumber reportlab weasyprint. OCR: brew install ocrmypdf.

Process

Step 1: Inspect First

Before processing a PDF, confirm:

  • Is it text-based or scanned? Open and check whether pdfplumber returns text. Empty text = scanned = needs OCR first.
  • How many pages? Multi-hundred-page PDFs need streaming, not full-load.
  • Is it encrypted? Attempt to open; if it asks for a password, get it from the user.

Step 2: Common Patterns

Extract all text:

import pdfplumber
with pdfplumber.open("input.pdf") as pdf:
    text = "\n\n".join(page.extract_text() or "" for page in pdf.pages)

Extract tables:

import pdfplumber
with pdfplumber.open("input.pdf") as pdf:
    for i, page in enumerate(pdf.pages):
        for j, table in enumerate(page.extract_tables()):
            print(f"Page {i+1} Table {j+1}: {table}")

Merge multiple PDFs:

from pypdf import PdfWriter
writer = PdfWriter()
for path in ["a.pdf", "b.pdf", "c.pdf"]:
    writer.append(path)
writer.write("merged.pdf")
writer.close()

Split PDF into single-page files:

from pypdf import PdfReader, PdfWriter
reader = PdfReader("input.pdf")
for i, page in enumerate(reader.pages):
    writer = PdfWriter()
    writer.add_page(page)
    writer.write(f"page_{i+1}.pdf")

Encrypt with password:

from pypdf import PdfReader, PdfWriter
reader = PdfReader("input.pdf")
writer = PdfWriter(clone_from=reader)
writer.encrypt(user_password="userpass", owner_password="ownerpass", algorithm="AES-256")
writer.write("encrypted.pdf")

Create a PDF from Markdown:

# Using weasyprint via HTML intermediate
import markdown
from weasyprint import HTML
html = markdown.markdown(open("input.md").read())
HTML(string=f"{html}").write_pdf("output.pdf")

OCR a scanned PDF (creates a searchable PDF):

ocrmypdf input.pdf output.pdf

Step 3: For Long PDFs

For PDFs over 20 pages where the user needs extracted content:

  • Don't dump 200 pages into a single response
  • Ask which pages or sections matter
  • Return a summary with section-anchored excerpts, not raw text

Step 4: Verify

  • Open the output PDF in a reader (Preview, Acrobat) before declaring done
  • For extracted text, spot-check it against the source (OCR and text extraction both have failure modes)
  • For merges, confirm page count = sum of inputs

Guardrails

  • Don't overwrite source PDFs. Always write to a new path by default.
  • Scanned PDFs need OCR before text extraction. Don't return an empty string and call it done.
  • Encrypted PDFs: Ask for the password. Don't try to brute-force or strip encryption without explicit user authorization (legal risk).
  • Large files: PDFs over 100MB or 500 pages should be processed in chunks.
  • Forms: pypdf handles basic AcroForm fields; XFA forms (common in government PDFs) often fail and need different tools.
  • OCR quality: OCR isn't magic. Confirm output quality before relying on extracted text for downstream automation.
  • Sensitive data: PDFs often contain contracts, financials, PII. Don't log contents and don't commit files to git unintentionally.
  • Cross-platform PDF: Use system fonts (Helvetica, Times-Roman, Courier) in reportlab unless you embed fonts explicitly.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.