/documents:ocrfrom documents
Adds searchable text layers to scanned/image-only PDFs using OCRmyPDF and Tesseract. Local, free, offline OCR with configurable flags for deskew, cleanup, rotation, and language support.
Ships in documents. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
OCRmyPDF (MPL-2.0) rasterises each page, runs Tesseract on it and writes a new PDF with an invisible text layer over the original image. Run it as uvx ocrmypdf ..., or as plain ocrmypdf when it is already on PATH (uv tool install ocrmypdf, brew install ocrmypdf or apt install ocrmypdf).
OCRmyPDF needs one system program that uvx cannot install: Tesseract. Ghostscript has been optional since OCRmyPDF 17 (the bundled pypdfium2 rasterises pages) but is still needed for some PDF/A conversions, and --clean needs unpaper.
tesseract --version && uvx ocrmypdf --version
Done when both print a version. If Tesseract is missing, install it for the OS:
| OS | Command |
|---|---|
| macOS (Homebrew) | brew install ocrmypdf (brings Tesseract, Ghostscript, unpaper); extra languages: brew install tesseract-lang |
| Debian / Ubuntu / WSL | sudo apt install ocrmypdf unpaper; extra languages: tesseract-ocr-<lang> e.g. tesseract-ocr-deu |
| Fedora | sudo dnf install ocrmypdf tesseract-osd; languages: tesseract-langpack-<lang> |
| Windows (native) | winget install -e --id tesseract-ocr.tesseract; Ghostscript 64-bit from ghostscript.com is recommended |
The distro package can lag behind PyPI; uvx ocrmypdf always runs the current release against the system Tesseract. Full matrix: https://ocrmypdf.readthedocs.io/en/latest/installation.html.
| Situation | Flags |
|---|---|
| Clean, straight scan | none |
| Pages slightly tilted | --deskew |
| Speckles or scanner noise | --clean (needs unpaper) |
| Book scan, one page per image | --deskew --clean --unpaper-args "--layout single" |
| Pages upside down or sideways | --rotate-pages |
| Many pages, want it faster | --jobs N (defaults to all cores) |
| Want plain text as well | --sidecar out.txt |
| Only some pages | --pages 1-10,15 |
| Some pages already have text | --skip-text |
| Existing OCR layer is poor | --redo-ocr |
| Not English | -l deu, or -l eng+deu for mixed (language pack must be installed) |
Done when every row that describes the scan has its flags in the command.
On anything over a few dozen pages, trial the flags on a short range first:
uvx ocrmypdf --deskew --clean --pages 1-5 --sidecar trial.txt input.pdf trial.pdf
Read trial.txt. Done when the text matches the source page for page; if it does not, adjust the flags from step 2 and rerun. Then the full run:
uvx ocrmypdf --deskew --clean --sidecar output.txt input.pdf output.pdf
Done when the command exits 0 and output.pdf exists. Exit code 6 means the PDF already has text - use pdf-extract, or add --skip-text / --redo-ocr.
For a folder, loop over the files and write "${f%.pdf}_ocr.pdf" beside each one.
The sidecar holds the plain text. For per-page text from the OCR'd PDF, run the pdf-extract skill on output.pdf - it now has a text layer.
Handwriting, unusual fonts, dense tables, equations and charts come out poorly. Spot-check the sidecar, note the bad page numbers, and send only those pages to the document-parse skill (its AI path). Done when every bad page you noted has been re-read there or reported to the user.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub henkisdabro/wookstar-claude-plugins --plugin documents4 skills in this plugin
/document-parseStructured parsing of complex documents into JSON and LLM-ready markdown with two local engines - LiteParse `lit` for PDFs and images (layout blocks, markdown, built-in OCR) and AILANG Parse `docparse` for office, email and e-book formats plus AI parsing of charts and images. Use when the user needs headings, tables, reading order or layout blocks out of a PDF, wants to read or parse a DOCX, PPTX, XLSX, ODT, EPUB, EML or MBOX file, needs track changes, comments or speaker notes, wants a chart, diagram, photo or handwritten page interpreted, or wants a file converted between formats ("turn this markdown into a DOCX"). Do NOT use for a quick plain-text read of a text-layer PDF - use pdf-extract; for making a scanned PDF searchable or bulk OCR - use ocr; for filling forms, merging, splitting or table export to CSV/Excel - use pdf-processing-pro; for authoring Word, Excel or PowerPoint files from scratch - use the document-skills plugin./pdf-extractFast, zero-AI text extraction from PDFs that have a text layer (digitally created PDFs from Word, Typst, WeasyPrint, wkhtmltopdf, LaTeX, etc) with pymupdf - instant and deterministic. Use when the user wants to read a PDF or asks what it says, extract its text to a file, read specific pages, batch-extract a folder of PDFs, or get PDF metadata (title, author, page count). Do NOT use for scanned or image-only PDFs, or when this returns blank text - use ocr; for headings, tables, layout blocks or AI analysis of complex layouts - use document-parse; for forms, merging, splitting or table export to CSV/Excel - use pdf-processing-pro.Other plugins' skills for the same job