Skills

PDF Toolkit

Structured `.pdf` operations: extract text/tables, merge pages from multiple PDFs...

Install

npx skills add TokenRhythm/opensquilla --skill pdf-toolkit -g -a claude-code -y
Category
Documents
Updated
3d ago
License
Apache-2.0
Context cost
Mediumabout 1,562 tokens
Runs scripts
Yes, review before use

What it does

Structured `.pdf` operations: extract text/tables, merge pages from multiple PDFs, split a PDF by page ranges, fill PDF form fields, and generate fresh PDFs from JSON. Trigger when the user wants deterministic programmatic PDF work, examples: pull tables from a report, combine three PDFs, extract pages 5-12, fill a tax form, or build a new PDF from data. This is the single public PDF entry and uses pypdf, pdfplumber, and reportlab.

pdf-toolkit

Deterministic, structural PDF operations. Use this skill for programmatic work where you know exactly what you want done. For a natural-language rewrite, first draft the replacement content with ordinary reasoning, then use the explicit extract/generate/merge operations here to create the final PDF.

Use the inline Python examples with execute_code in a restricted channel. Keep files in the active workspace and call publish_artifact with the finished PDF. Shell commands below require an available exec_command; they are optional shortcuts, not a reason to request host execution. If the sandbox or a required library is unavailable, report the limitation rather than retrying outside the sandbox.

Decide the operation

GoalScript
Get text or tables out of a PDFextract.py
Combine pages from multiple PDFsmerge.py
Split a PDF by page rangessplit.py
Fill /Tx form fields in a PDFform_fill.py
Build a new PDF from datainline reportlab snippet, see Path C below

Path A: Extract

python {baseDir}/scripts/extract.py /path/to/doc.pdf --json

Output:

{
  "pages": 12,
  "metadata": {"title": "...", "author": "..."},
  "text": [
    {"page": 1, "content": "..."},
    {"page": 2, "content": "..."}
  ],
  "tables": [
    {"page": 3, "rows": [["..."], ["..."]]}
  ]
}

Text uses pdfplumber (already in default dependencies) which preserves column layout better than naive PDF text extraction. Tables use pdfplumber.extract_tables() with default settings; for tricky layouts pass --tables-strategy lines|text|explicit to switch detection mode.

For OCR (scanned PDFs), this skill does not include Tesseract, use the sibling skill that wraps an OCR engine (out of scope here).


Path B: Merge / Split

Merge full files:

python {baseDir}/scripts/merge.py a.pdf b.pdf c.pdf --out combined.pdf

Or merge specific page ranges with the manifest form:

Read the whole SKILL.md on GitHub

More in Documents