PDF Generation, Forms and Extraction
pipeshub-ai/pipeshub-ai
Picks the right library for generating a new PDF, filling an existing PDF form, or extracting text and tables, defaulting to Node where possible.
Reads, transforms, composes and fills PDFs with Python scripts for extraction, merging, watermarking, encryption, OCR and form filling.
$ npx skills add XiaomiMiMo/MiMo-Code --skill pdf-official -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install XiaomiMiMo/MiMo-Code pdf-official --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/cli/src/skill/builtin/.bundle/pdf-official .claude/skills/pdf-official && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "pdf-official" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/packages/cli/src/skill/builtin/.bundle/pdf-official into .claude/skills/pdf-official/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pdf-official", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/XiaomiMiMo/MiMo-Code/tree/main/packages/cli/src/skill/builtin/.bundle/pdf-officialType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add XiaomiMiMo/MiMo-Code --skill pdf-official -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install XiaomiMiMo/MiMo-Code pdf-official --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .agents/skills && cp -r skills-src/packages/cli/src/skill/builtin/.bundle/pdf-official .agents/skills/pdf-official && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "pdf-official" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/packages/cli/src/skill/builtin/.bundle/pdf-official into .agents/skills/pdf-official/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pdf-official", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add XiaomiMiMo/MiMo-Code --skill pdf-official -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install XiaomiMiMo/MiMo-Code pdf-official --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/packages/cli/src/skill/builtin/.bundle/pdf-official .cursor/skills/pdf-official && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "pdf-official" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/packages/cli/src/skill/builtin/.bundle/pdf-official into .cursor/skills/pdf-official/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pdf-official", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/XiaomiMiMo/MiMo-Code.git --path packages/cli/src/skill/builtin/.bundle/pdf-official--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add XiaomiMiMo/MiMo-Code --skill pdf-official -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install XiaomiMiMo/MiMo-Code pdf-official --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/packages/cli/src/skill/builtin/.bundle/pdf-official .gemini/skills/pdf-official && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "pdf-official" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/packages/cli/src/skill/builtin/.bundle/pdf-official into .gemini/skills/pdf-official/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pdf-official", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install XiaomiMiMo/MiMo-Code pdf-officialInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add XiaomiMiMo/MiMo-Code --skill pdf-official -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .github/skills && cp -r skills-src/packages/cli/src/skill/builtin/.bundle/pdf-official .github/skills/pdf-official && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "pdf-official" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/packages/cli/src/skill/builtin/.bundle/pdf-official into .github/skills/pdf-official/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pdf-official", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add XiaomiMiMo/MiMo-Code --skill pdf-official -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install XiaomiMiMo/MiMo-Code pdf-official --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/packages/cli/src/skill/builtin/.bundle/pdf-official .opencode/skills/pdf-official && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "pdf-official" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/packages/cli/src/skill/builtin/.bundle/pdf-official into .opencode/skills/pdf-official/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pdf-official", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
pdf-officialReads, transforms, composes and fills PDFs with Python scripts for extraction, merging, watermarking, encryption, OCR and form filling.
This toolkit handles four kinds of PDF work and routes by the verb in your request: extracting text, tables, metadata and images; transforming files by combining, carving, rotating, cropping, watermarking, encrypting or shrinking; composing new PDFs such as reports, invoices and certificates; and filling forms, whether AcroForm or scanned. Scanned documents go through OCR.
Every task starts with a probe: survey.py reports the page count, whether the file is encrypted, whether it has an AcroForm and whether page one looks scanned. Mixed tasks follow the order probe, plan, extract or compose, then validate. Separate scripts cover applying form values, carving pages, combining files, overlaying text, rendering pages, reorienting, text dumps and sanity checks, each with argparse and defined exit codes.
It is built on permissively licensed Python libraries (pypdf, pdfplumber, pypdfium2, reportlab) and optionally qpdf, so it can be embedded in commercial projects. Installation is a single pip command, and a bundled runtime is used instead when the MIMO_PYTHON environment variable is set.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 6babeb0. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 11 files in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
brewapt-getqpdfpython3uvpdftotextFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
PDF Toolkit loads about 1.7k tokens when it runs. Until then it costs about 155 tokens; SKILL.md has 638 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from XiaomiMiMo/MiMo-Code at commit 6babeb0, republished under its Apache-2.0 licence (© XiaomiMiMo). 638 words, ~1,655 tokens.
.claude/skills/pdf-official/SKILL.md (or your agent's skills folder). This skill also uses 17 other files; get the full folder from GitHub.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.
Pick the sub-guide by the verb of the request.
| Task | Path | Read |
|---|---|---|
| Pull text / tables / metadata / images out of an existing PDF | Extract | extract.md |
| Combine, carve, rotate, crop, watermark, encrypt, or shrink | Transform | transform.md |
| Build a PDF that doesn't exist yet (report, invoice, certificate) | Compose | compose.md |
| Fill a form (AcroForm or scanned) | Interactive | interactive.md |
| Scanned / image-only PDF (no selectable text) | Extract → OCR | extract.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.
Bundled runtime: when the
MIMO_PYTHONenvironment variable is set, skip the installs below — run every command withpython3/uv runreplaced by"$MIMO_PYTHON"(pypdf/pypdfium2/reportlab/Pillow preinstalled; pip console scripts unavailable, use"$MIMO_PYTHON" -m <module>). A bundled qpdf is exposed asMIMO_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 PillowAdd these external binaries only when you actually need them:
# qpdf — merge/split/encrypt/repair, Apache-2.0
brew install qpdf # macOS
apt-get install -y qpdf # Debian / Ubuntu
# Tesseract — OCR for scanned PDFs, Apache-2.0
brew install tesseract
python3 -m pip install pytesseract pdf2image
apt-get install -y tesseract-ocr
# Poppler — pdftotext / pdftoppm / pdfimages, GPL-2.0
# Optional. Only install if you accept a GPL dependency at CLI level.
brew install poppler
apt-get install -y poppler-utilsEvery script under scripts/ uses argparse. Exit codes:
0 OK · 1 runtime failure · 2 bad arguments · 3 validation failure
(apply_values.py / overlay_text.py; sanity_check.py reports findings
with exit 1).
Any single script can be lifted into another project — none imports from a
shared framework.
scripts/survey.py path/to/file.pdf --prettySample output:
{
"path": "/abs/path/file.pdf",
"page_count": 12,
"is_locked": false,
"form_field_count": 34,
"looks_scanned": false,
"metadata": {"Title": "...", "Author": "...", "Producer": "..."}
}Route by the flags:
is_locked: true → unlock first (qpdf --password=… --decrypt). Almost
every reader library refuses locked files.form_field_count > 0 → widgets path in interactive.md §1.form_field_count == 0 AND you need to fill it → overlay path
in interactive.md §2.looks_scanned: true → skip pypdf text extraction, go straight to OCR
(extract.md §5).| Task | Preferred | Reason | Fallback |
|---|---|---|---|
| Plain text | pdftotext -layout | fastest, keeps columns | pypdf |
| Positioned text | pdfplumber | char-level bboxes | pypdfium2.get_text |
| Tables | pdfplumber | tunable table_settings | pandas over manual CSV |
| Page → image | pypdfium2 | Apache/BSD, no GPL | pdftoppm (GPL) |
| Merge / carve / rotate | pypdf | pure Python | qpdf --pages (faster on huge files) |
| Encrypt / repair / linearise | qpdf | handles broken input | pypdf (basic encrypt only) |
| Compose from scratch | reportlab | mature, BSD | pdf-lib in Node |
| Fill AcroForm | pypdf.update_page_form_field_values | preserves widget appearances | pdf-lib in Node |
| Overlay on non-fillable | reportlab + pypdf.merge_page | two-layer merge, see interactive.md | — |
interactive.md §2.c.pypdf.extract_text() returns nothing for scans. That's not a bug —
there's no text stream. Use the looks_scanned flag and route to OCR.<sub> / <super> XML in Paragraph, or move the pen manually on canvas.
See compose.md §5.compose.md §4 (resolve_cjk_font());
the terminal fallback is the built-in CID font, never Helvetica.probe_fields.py returns [] on a
PDF that clearly has widgets in Adobe Reader, it's XFA — flatten it in
Acrobat first.writer.encrypt(pw) in pypdf uses RC4 by default. For real AES-256,
pass algorithm="AES-256", or use qpdf --encrypt … 256 --.Open the sub-guide from the routing table and work through it end to end. Each sub-guide has a Validation section at the bottom describing how to confirm the result.
© XiaomiMiMo, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 17 other files (scripts) in packages/cli/src/skill/builtin/.bundle/pdf-official of XiaomiMiMo/MiMo-Code.
Open the folder on GitHubat commit 6babeb0
PDF Toolkit next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| PDF Toolkit this skillXiaomiMiMo/MiMo-Code | 14k | — | ~1.7k | Automated safety check: Pass | Apache-2.0 | |
| PDF Generation, Forms and Extractionpipeshub-ai/pipeshub-ai | 3.8k | — | ~2.9k | Automated safety check: Pass | Apache-2.0 | |
| PDF Processinganthropics/skills | 180k | 48 repos | ~2k | Automated safety check: Pass | Proprietary | |
| PDF Processing with PythonHKUDS/DeepTutor | 41k | — | ~2.7k | Automated safety check: Pass | Apache-2.0 | |
| PDF ToolkitTokenRhythm/opensquilla | 7.1k | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| PDF Processing Guideagentscope-ai/QwenPaw | 35k | — | ~1.8k | Automated safety check: Pass | Proprietary |
pipeshub-ai/pipeshub-ai
Picks the right library for generating a new PDF, filling an existing PDF form, or extracting text and tables, defaulting to Node where possible.
anthropics/skills
Handles everyday PDF jobs in Python and on the command line: extract text and tables, merge, split, rotate, watermark, fill forms, encrypt and OCR.
HKUDS/DeepTutor
Reads, extracts from, creates, merges, splits, watermarks, encrypts and fills PDF files with pdfplumber, pypdf and reportlab inside a Python sandbox.
TokenRhythm/opensquilla
Deterministic PDF operations through bundled scripts: extract text and tables, merge files or page ranges, split by range, fill form fields and build PDFs from data.
agentscope-ai/QwenPaw
Handles PDF tasks with Python libraries and command-line tools: extract text and tables, merge, split, rotate, create, fill forms and more.
telagod/code-abyss
Picks the right Python library or CLI tool for a PDF task, text and table extraction, merging, splitting, OCR, watermarking or form filling, and points to a matching recipe.
XiaomiMiMo/MiMo-Code
Searches arXiv, fetches metadata, generates BibTeX, downloads PDFs and finds citations and related papers using a bundled Python script.
XiaomiMiMo/MiMo-Code
Interactive guide for creating, reviewing and fixing agent skills (SKILL.md folders), covering structure, frontmatter rules, trigger phrases and validation before sharing.
XiaomiMiMo/MiMo-Code
Produces, edits and reads Microsoft Word files through python-docx and lxml, with a decision table for picking the lightest workflow for a given task.
XiaomiMiMo/MiMo-Code
Lets one MiMoCode process drive another, headless with JSON events or interactively through tmux, to test behavior and visual regressions with parseable evidence.
XiaomiMiMo/MiMo-Code
Builds, edits, cleans, recalculates and reads Excel workbooks and CSV files with openpyxl and pandas, plus LibreOffice for recalculation and PDF export.
XiaomiMiMo/MiMo-Code
Hands coding work to the Claude Code CLI from the terminal in print, interactive tmux or background mode, only when you explicitly ask for Claude Code.
Categories
Reads, transforms, composes and fills PDFs with Python scripts for extraction, merging, watermarking, encryption, OCR and form filling. This toolkit handles four kinds of PDF work and routes by the verb in your request: extracting text, tables, metadata and images; transforming files by combining, carving, rotating, cropping, watermarking, encrypting or shrinking; composing new PDFs such as reports, invoices and certificates; and filling forms, whether AcroForm or scanned. Scanned documents go through OCR.
PDF Toolkit fits situations like: extracting text or tables from an existing PDF; merging, splitting, rotating or watermarking PDF pages; filling a fillable form or overlaying text onto a scanned one; building a new PDF report, invoice or certificate.
Run `npx skills add XiaomiMiMo/MiMo-Code --skill pdf-official -a claude-code`. Or copy the skill folder (packages/cli/src/skill/builtin/.bundle/pdf-official in XiaomiMiMo/MiMo-Code) into .claude/skills/pdf-official in your project. Claude Code loads it when a task matches its description.
Run `npx skills add XiaomiMiMo/MiMo-Code --skill pdf-official -a codex`. Or copy the skill folder (packages/cli/src/skill/builtin/.bundle/pdf-official in XiaomiMiMo/MiMo-Code) into .agents/skills/pdf-official in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add XiaomiMiMo/MiMo-Code --skill pdf-official -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pdf-official, .gemini/skills/pdf-official, .github/skills/pdf-official and .opencode/skills/pdf-official in your project.
Going by SKILL.md and its folder, PDF Toolkit needs Python for the scripts in its folder and the command-line tools its instructions call (brew, apt-get, qpdf, python3, uv and pdftotext). Our summary lists: Python 3 with pypdf, pdfplumber, pypdfium2, reportlab and Pillow; qpdf, only for merge, split, encrypt and repair tasks.
SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
PDF Toolkit is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.7k tokens (SKILL.md is roughly 6.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with PDF Toolkit: PDF Generation, Forms and Extraction (pipeshub-ai/pipeshub-ai, 3.8k stars), PDF Processing (anthropics/skills, 180k stars), PDF Processing with Python (HKUDS/DeepTutor, 41k stars) and PDF Toolkit (TokenRhythm/opensquilla, 7.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
XiaomiMiMo (a GitHub organization) maintains it in XiaomiMiMo/MiMo-Code, which has 13,611 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on October 3, 2026.
Source: XiaomiMiMo/MiMo-Code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.