PDF files: create, read, merge, fill, OCR, edit text.
Claude Code
$ npx -y skills add NousResearch/hermes-agent --skill pdf --agent claude-code
Codex
$ npx skills add NousResearch/hermes-agent --skill pdf -a codex -y
Cursor
$ npx skills add NousResearch/hermes-agent --skill pdf -a cursor -y
Gemini CLI
$ npx skills add NousResearch/hermes-agent --skill pdf -a gemini-cli -y
GitHub Copilot
$ npx skills add NousResearch/hermes-agent --skill pdf -a github-copilot -y
OpenCode
$ npx skills add NousResearch/hermes-agent --skill pdf -a opencode -y
Windsurf
$ npx skills add NousResearch/hermes-agent --skill pdf -a windsurf -y
SKILL.md
pdf.SKILL.mdname: pdf
description: "PDF files: create, read, merge, fill, OCR, edit text."
version: 1.1.0
author: Nous Research
license: MIT
platforms: [linux, macos, windows]
metadata:
hermes:
tags: [pdf, documents, forms, ocr, text-extraction, reportlab, pypdf, pdfplumber, pymupdf, marker]
category: productivity
related_skills: [microsoft-office]PDF Skill
Create PDFs from structured specs, build and fill AcroForm forms (with layout linting and visual overlays), extract text/tables/metadata, merge/split/rotate/watermark/stamp pages, export page images, manage metadata and attachments, and encrypt/decrypt — using pypdf, reportlab, and pdfplumber. Two absorbed capabilities live in references/ (read the matching file before those tasks):
- **Scanned/image-only PDFs and OCR** (pymupdf fast path, marker-pdf quality path, scripts/extract_pymupdf.py + scripts/extract_marker.py): `references/ocr-extraction.md`
- **Editing text inside an existing PDF via natural-language prompts** (nano-pdf CLI): `references/nano-pdf-editing.md`
When to Use
- Generate a report, invoice, or multi-page document as PDF.
- Build a fillable AcroForm (text/checkbox/radio/dropdown) from a JSON spec, linting the layout first.
- Pull text, tables (JSON/CSV), metadata, or form-field values out of a PDF.
- Merge, split, rotate, extract page subsets, watermark, stamp text/images at coordinates, bookmark, or compress PDFs.
- Export pages as PNGs for visual review or for OCR hand-off; set/clear document metadata; add/extract file attachments.
- Fill or flatten AcroForm forms; encrypt or decrypt with passwords.
- NOT for scanned/image-only PDFs (use `references/ocr-extraction.md`) and NOT for pixel-perfect HTML-to-PDF rendering (use a headless browser).
Prerequisites
- Python 3.10+ with `pypdf`, `reportlab`, `pdfplumber`.
- Pick the interpreter with `terminal`. Use `python` when it already imports
the libraries (the Hermes Docker image ships them). Otherwise, when `hermes` is on PATH, let Hermes build its shared, pinned documents environment under the Hermes home: it survives container restarts, never touches the Hermes install itself, and is safe to run from several agents at once. When it is not (the terminal runs in a Docker sandbox, which has no Hermes), the block builds a venv in the sandbox home with the same pinned versions. Use this exact block in every document skill so they all share one environment:
python -c "import pypdf, reportlab, pdfplumber" 2>/dev/null && PY=python || if command -v hermes >/dev/null 2>&1; then
PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"
else
PY="$HOME/.cache/hermes-docs-venv/bin/python"
"$PY" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null || (
# Safe to run from several agents at once: each caller builds a private venv,
# a symlink publishes the first finished one atomically, the others delete theirs;
# a published build is replaced and deleted only while it still fails to import.
mkdir -p "$HOME/.cache" && cd "$HOME/.cache" && stage="$(mktemp -d hermes-docs-venv.XXXXXX)" || exit 1
old="$(readlink hermes-docs-venv)" # the published build, if any (another agent may have just published it)
python3 -m venv "$stage" &&
"$stage/bin/python" -m pip install -q --disable-pip-version-check python-docx==1.2.0 openpyxl==3.1.5 python-pptx==1.0.2 reportlab==5.1.0 pypdf==6.21.4 pdfplumber==0.11.10 pypdfium2==5.14.0 &&
"$stage/bin/python" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" &&
if [ -z "$old" ]; then python3 -c 'import os, sys; os.symlink(*sys.argv[1:])' "$stage" hermes-docs-venv
elif [ "$(readlink hermes-docs-venv)" = "$old" ] && ! "$old/bin/python" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null; then
ln -s "$stage" "$stage.lnk" && python3 -c 'import os, sys; os.replace(*sys.argv[1:])' "$stage.lnk" hermes-docs-venv &&
case "$old" in hermes-docs-venv.??????) rm -rf "$old" ;; esac
fi 2>/dev/null
[ "$(readlink hermes-docs-venv)" = "$stage" ] || rm -rf "$stage" "$stage.lnk"
)
fi
export PY
"$PY" scripts/pdf_create.py --helpRun every helper below with `"$PY"`. In PowerShell (Hermes runs on that host, so it is on PATH): `$env:PY = hermes pm environment documents --extra documents --extra documents-pdf`. Never `pip install` into the interpreter that runs Hermes or into the `hermes pm environment` one; Hermes owns both.
- Page rasterization (`pdf_page_image.py`, overlay rendering) uses `pypdfium2`, which the documents environment already has (if your `python` lacks it, switch `PY` to that environment with the command above), or poppler's `pdftoppm` on PATH. Scripts fall back pypdfium2 → pdftoppm and report `{"rendered": false, "missing": [...]}` (exit 0) when neither exists.
- Each helper script checks imports lazily and prints an install hint if a dependency is missing.
How to Run
All helpers live in `scripts/` and are argparse CLIs — run them with the `terminal` tool; every one supports `--help`. They read/write JSON strictly as UTF-8, print JSON results to stdout, and exit non-zero on failure.
python scripts/pdf_create.py spec.json -o out.pdf # build PDF from JSON spec
python scripts/pdf_make_form.py formspec.json -o form.pdf # build fillable AcroForm from JSON spec
python scripts/pdf_form_layout.py formspec.json # lint form layout BEFORE building
python scripts/pdf_form_layout.py formspec.json --render-overlay boxes.png [--pdf form.pdf]
python scripts/pdf_read.py doc.pdf --text # per-page text (JSON)
python scripts/pdf_read.py doc.pdf --tables --csv-dir t/ # tables to JSON + CSV files
python scripts/pdf_read.py doc.pdf --meta # metadata, page sizes, encrypted/scanned flags
python scripts/pdf_read.py form.
Read more
name: pdf
description: "PDF files: create, read, merge, fill, OCR, edit text."
version: 1.1.0
author: Nous Research
license: MIT
platforms: [linux, macos, windows]
metadata:
hermes:
tags: [pdf, documents, forms, ocr, text-extraction, reportlab, pypdf, pdfplumber, pymupdf, marker]
category: productivity
related_skills: [microsoft-office]PDF Skill
Create PDFs from structured specs, build and fill AcroForm forms (with layout linting and visual overlays), extract text/tables/metadata, merge/split/rotate/watermark/stamp pages, export page images, manage metadata and attachments, and encrypt/decrypt — using pypdf, reportlab, and pdfplumber. Two absorbed capabilities live in references/ (read the matching file before those tasks):
- **Scanned/image-only PDFs and OCR** (pymupdf fast path, marker-pdf quality path, scripts/extract_pymupdf.py + scripts/extract_marker.py): `references/ocr-extraction.md`
- **Editing text inside an existing PDF via natural-language prompts** (nano-pdf CLI): `references/nano-pdf-editing.md`
When to Use
- Generate a report, invoice, or multi-page document as PDF.
- Build a fillable AcroForm (text/checkbox/radio/dropdown) from a JSON spec, linting the layout first.
- Pull text, tables (JSON/CSV), metadata, or form-field values out of a PDF.
- Merge, split, rotate, extract page subsets, watermark, stamp text/images at coordinates, bookmark, or compress PDFs.
- Export pages as PNGs for visual review or for OCR hand-off; set/clear document metadata; add/extract file attachments.
- Fill or flatten AcroForm forms; encrypt or decrypt with passwords.
- NOT for scanned/image-only PDFs (use `references/ocr-extraction.md`) and NOT for pixel-perfect HTML-to-PDF rendering (use a headless browser).
Prerequisites
- Python 3.10+ with `pypdf`, `reportlab`, `pdfplumber`.
- Pick the interpreter with `terminal`. Use `python` when it already imports
the libraries (the Hermes Docker image ships them). Otherwise, when `hermes` is on PATH, let Hermes build its shared, pinned documents environment under the Hermes home: it survives container restarts, never touches the Hermes install itself, and is safe to run from several agents at once. When it is not (the terminal runs in a Docker sandbox, which has no Hermes), the block builds a venv in the sandbox home with the same pinned versions. Use this exact block in every document skill so they all share one environment:
python -c "import pypdf, reportlab, pdfplumber" 2>/dev/null && PY=python || if command -v hermes >/dev/null 2>&1; then
PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"
else
PY="$HOME/.cache/hermes-docs-venv/bin/python"
"$PY" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null || (
# Safe to run from several agents at once: each caller builds a private venv,
# a symlink publishes the first finished one atomically, the others delete theirs;
# a published build is replaced and deleted only while it still fails to import.
mkdir -p "$HOME/.cache" && cd "$HOME/.cache" && stage="$(mktemp -d hermes-docs-venv.XXXXXX)" || exit 1
old="$(readlink hermes-docs-venv)" # the published build, if any (another agent may have just published it)
python3 -m venv "$stage" &&
"$stage/bin/python" -m pip install -q --disable-pip-version-check python-docx==1.2.0 openpyxl==3.1.5 python-pptx==1.0.2 reportlab==5.1.0 pypdf==6.21.4 pdfplumber==0.11.10 pypdfium2==5.14.0 &&
"$stage/bin/python" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" &&
if [ -z "$old" ]; then python3 -c 'import os, sys; os.symlink(*sys.argv[1:])' "$stage" hermes-docs-venv
elif [ "$(readlink hermes-docs-venv)" = "$old" ] && ! "$old/bin/python" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null; then
ln -s "$stage" "$stage.lnk" && python3 -c 'import os, sys; os.replace(*sys.argv[1:])' "$stage.lnk" hermes-docs-venv &&
case "$old" in hermes-docs-venv.??????) rm -rf "$old" ;; esac
fi 2>/dev/null
[ "$(readlink hermes-docs-venv)" = "$stage" ] || rm -rf "$stage" "$stage.lnk"
)
fi
export PY
"$PY" scripts/pdf_create.py --helpRun every helper below with `"$PY"`. In PowerShell (Hermes runs on that host, so it is on PATH): `$env:PY = hermes pm environment documents --extra documents --extra documents-pdf`. Never `pip install` into the interpreter that runs Hermes or into the `hermes pm environment` one; Hermes owns both.
- Page rasterization (`pdf_page_image.py`, overlay rendering) uses `pypdfium2`, which the documents environment already has (if your `python` lacks it, switch `PY` to that environment with the command above), or poppler's `pdftoppm` on PATH. Scripts fall back pypdfium2 → pdftoppm and report `{"rendered": false, "missing": [...]}` (exit 0) when neither exists.
- Each helper script checks imports lazily and prints an install hint if a dependency is missing.
How to Run
All helpers live in `scripts/` and are argparse CLIs — run them with the `terminal` tool; every one supports `--help`. They read/write JSON strictly as UTF-8, print JSON results to stdout, and exit non-zero on failure.
python scripts/pdf_create.py spec.json -o out.pdf # build PDF from JSON spec python scripts/pdf_make_form.py formspec.json -o form.pdf # build fillable AcroForm from JSON spec python scripts/pdf_form_layout.py formspec.json # lint form layout BEFORE building python scripts/pdf_form_layout.py formspec.json --render-overlay boxes.png [--pdf form.pdf] python scripts/pdf_read.py doc.pdf --text # per-page text (JSON) python scripts/pdf_read.py doc.pdf --tables --csv-dir t/ # tables to JSON + CSV files python scripts/pdf_read.py doc.pdf --meta # metadata, page sizes, encrypted/scanned flags python scripts/pdf_read.py form.
The self-improving AI agent built by Nous Research. It's the only agent with a built-in learning loop — it creates skills from experience, improves them during use, nudges itself to persist knowledge, searches its own past conversations, and builds a
Other skills on hermes-agent.
More skills from other plugins.
karpathy-guidelines
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
agent-builder
Design and build AI agents for any domain. Use when users: (1) ask to "create an agent", "build an assistant", or "design an AI…
Questions about pdf.
- Which coding agents can use pdf?
- pdf installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

