Pdf Toolkit logo

Pdf Toolkit

OrganizationPopular
TokenRhythm
pdf-toolkit

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.

Overview

PublisherTokenRhythm
Repositoryopensquilla
Skill namepdf-toolkit
Stars
7K
Forks
566
Bundled files
7
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 7 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by TokenRhythm on GitHub. Read the source before you install it.

Installation

Install the Pdf Toolkit AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/TokenRhythm/opensquilla.git /tmp/opensquilla
mkdir -p .claude/skills
cp -r /tmp/opensquilla/src/opensquilla/skills/bundled/pdf-toolkit .claude/skills/pdf-toolkit
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pdf Toolkit in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Pdf Toolkit on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Pdf Toolkit is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

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

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

Output:

json
{
  "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:

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

Or merge specific page ranges with the manifest form:

bash
python {baseDir}/scripts/merge.py manifest.json --out combined.pdf

manifest.json:

json
[
  {"file": "a.pdf", "pages": "1-3"},
  {"file": "b.pdf", "pages": "5,7,9-11"},
  {"file": "c.pdf"}
]

Page ranges are 1-based, comma-separated, hyphen for ranges. Omit pages to include the whole file. Splits use the same syntax in reverse:

bash
python {baseDir}/scripts/split.py input.pdf --pages "1-3,7,10-12" --out output_dir/

Each range writes one output file: output_dir/input_001.pdf, output_dir/input_002.pdf, …


Path C: Form fill

bash
python {baseDir}/scripts/form_fill.py form.pdf data.json --out filled.pdf

data.json maps field name → string value:

json
{
  "applicant_name": "Wei E.",
  "submission_date": "2026-05-06",
  "agreed": "Yes"
}

The script discovers fields via pypdf.PdfReader.get_fields() and updates them with update_page_form_field_values(). Fields not present in the JSON are left untouched. Run with --list-fields to enumerate the form's fields without filling.

Caveats:

  • /Btn checkbox fields take the export value (often Yes, On, or 1) rather than true — inspect with --list-fields to discover.
  • AcroForm fills only. XFA forms (used by some legal templates) require Adobe-specific tooling and are out of scope.
  • Some signed PDFs invalidate the signature when fields change. Strip signatures explicitly with --clear-signatures if that is intended.

Path D: Generate from scratch

Use reportlab directly when you need a new PDF:

python
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import LETTER
from pathlib import Path

c = canvas.Canvas(str(Path("out.pdf")), pagesize=LETTER)
c.setFont("Helvetica-Bold", 18)
c.drawString(72, 720, "Q3 Review")
c.setFont("Helvetica", 11)
c.drawString(72, 696, "Revenue grew 18% year over year.")
c.showPage()
c.save()

For tables, headers/footers, and multi-column layouts, switch to reportlab.platypus (SimpleDocTemplate, Paragraph, Table, PageBreak). See references/reportlab.md.


Natural-language changes

This public entry deliberately keeps the PDF mutation step deterministic. For requests such as "make the title shorter", inspect the source page, draft the replacement text with the model, and generate a new document with the reviewed content. Do not claim that arbitrary in-place page rewriting is available.


Common pitfalls

SymptomCauseFix
Extracted text is emptyScanned PDF, no text layerOCR is out of scope; use a separate OCR skill
Garbled characters in extractPDF uses a custom font encodingTry pdfplumber.open(path, laparams={...}) with char_margin adjustments
Merged PDF is hugeUnderlying PDFs include large embedded fontsSubset fonts via pypdf compress_content_streams()
Form fill silently no-opsField name in JSON does not match PDF field nameRun with --list-fields first to see exact names
Pages out of order after splitRange overlap collapsed unexpectedlyUse disjoint ranges, e.g. 1-3,4-6 not 1-5,3-6

Boundaries

  • This skill works with text-based and form-based PDFs. Scanned image PDFs need OCR before any text path produces results.
  • Encrypted PDFs are read-only here. Decryption requires the user-supplied password and is out of scope for this skill.
  • For PDF-to-image rendering, use a separate skill that wraps Poppler or PyMuPDF.
  • Digital signature operations (signing, verifying, revoking) are out of scope.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Pdf Toolkit AI skill do?

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.

Why use Pdf Toolkit on TypingMind?

Because you install it once and use it with any model. Pdf Toolkit is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Pdf Toolkit in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/TokenRhythm/opensquilla/tree/main/src/opensquilla/skills/bundled/pdf-toolkit. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Pdf Toolkit?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Pdf Toolkit?

As many as you like. As long as a model supports skills, you can use Pdf Toolkit with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Pdf Toolkit AI skill free?

Yes. It is published on GitHub by TokenRhythm under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇