Skills

PDF Official

Use this skill whenever a PDF file is being produced, opened, transformed, filled, or...

Install

npx skills add XiaomiMiMo/MiMo-Code --skill pdf-official -g -a claude-code -y
Repository
XiaomiMiMo/MiMo-Code13.7k
Category
Documents
Updated
3d ago
License
MIT
Context cost
Lightabout 1,473 tokens
Runs scripts
Yes, review before use

What it does

Use this skill whenever a PDF file is being produced, opened, transformed, filled, or read. That includes: extracting text or tables from an existing PDF; combining, carving, rotating, cropping, or watermarking pages; composing a fresh PDF (report, invoice, certificate); filling AcroForm fields or overlaying text onto a non-fillable scanned form; encrypting or unlocking a PDF; running OCR over a scanned document; rendering pages to PNG/JPEG for visual analysis. Trigger on mentions of 'PDF', a filename ending in .pdf, requests like 'turn this into a PDF report', or references to AcroForm / form fields.

PDF skill

An Apache-2.0 toolkit for reading, composing, transforming, and filling PDF files. Written from scratch on top of permissively-licensed open-source libraries (pypdf, pdfplumber, pypdfium2, reportlab, pdf-lib, qpdf) so this can be embedded in commercial projects without special agreement.

Route the task

Pick the sub-guide by the verb of the request.

TaskPathRead
Pull text / tables / metadata / images out of an existing PDFExtractextract.md
Combine, carve, rotate, crop, watermark, encrypt, or shrinkTransformtransform.md
Build a PDF that doesn't exist yet (report, invoice, certificate)Composecompose.md
Fill a form (AcroForm or scanned)Interactiveinteractive.md
Scanned / image-only PDF (no selectable text)Extract → OCRextract.md §5

If a task mixes several of these, follow the order: probe → plan → extract or compose → validate.

Every path starts with a probe. scripts/survey.py returns page count, whether the file is encrypted, whether it has an AcroForm, and whether page 1 looks like a scan.

First install

Bundled runtime: when the MIMO_PYTHON environment variable is set, skip the installs below, run every command with python3/uv run replaced by "$MIMO_PYTHON" (pypdf/pypdfium2/reportlab/Pillow preinstalled; pip console scripts unavailable, use "$MIMO_PYTHON" -m <module>). A bundled qpdf is exposed as MIMO_QPDF (picked up automatically by the scripts here); invoke it directly as "$MIMO_QPDF" --check file.pdf.

Python-only path (all BSD / MIT / Apache), covers 95% of tasks:

python3 -m pip install --upgrade pypdf pdfplumber pypdfium2 reportlab Pillow

Add these external binaries only when you actually need them:

Read the whole SKILL.md on GitHub

More in Documents