ericgandrade/claude-superskills/document-converter
Claude Code and agent skill by ericgandrade/claude-superskills
- community
Checking that the SKILL.md file is still in the repository.
This skill should be used when the user needs to convert documents between formats (Office to PDF, PDF to images, image to PDF), perform PDF operations (merge, split, rotate, encrypt, decrypt), or run OCR on scanned documents. Uses local free tools — LibreOffice, ghostscript, pdftk, tesseract, and imagemagick — with no API key required. Trigger when the user says "convert this document", "export to PDF", "merge PDFs", "split PDF", "rotate PDF", "OCR this scan", "convert PPTX to PDF", "convert DOCX to PDF", or any document format conversion request.
Install
npx vskill@latest install ericgandrade/claude-superskills/document-converterSKILL.md
document-converter
Purpose
Convert documents between formats and perform PDF operations using local, free, offline tools. No API key, no cost, no internet required. Supports Office formats, PDF manipulation, image-to-PDF, and OCR using LibreOffice, ghostscript, pdftk, tesseract, and imagemagick.
When to Use
- Converting Office documents (DOCX, PPTX, XLSX, ODP, ODT) to PDF or HTML
- Converting PDF pages to images (PNG, JPG, TIFF) or images to PDF
- PDF operations: merge multiple PDFs, split by page range, rotate pages, encrypt or decrypt
- OCR: extract searchable text from scanned PDFs or image files
- Any document format conversion that does not involve video or audio
Do NOT use for:
- Video or audio format conversion (use a dedicated media skill)
- Converting code between programming languages
- Simple markdown → HTML (use pandoc directly)
- Structured text extraction from PDFs (use
docling-converterinstead)
Step 0: Discovery — Detect Available Tools
Before any conversion, detect which tools are installed and identify the operating system:
If a required tool is missing, show the install command for the user's OS before proceeding:
| Tool | macOS | Linux (apt) | Windows | |
|---|---|---|---|---|
| LibreOffice | brew install --cask libreoffice | sudo apt install libreoffice | winget install TheDocumentFoundation.LibreOffice | |
| Ghostscript | brew install ghostscript | sudo apt install ghostscript | winget install ArtifexSoftware.GhostScript | |
| pdftk | brew install pdftk-java | sudo apt install pdftk | winget install PDFTechnologies.PDFtk | |
| Tesseract | brew install tesseract | sudo apt install tesseract-ocr | winget install UB-Mannheim.TesseractOCR | |
| ImageMagick | brew install imagemagick | sudo apt install imagemagick | winget install ImageMagick.ImageMagick |
If the user is on Windows and Microsoft Office is installed, note that LibreOffice and Office produce equivalent results for DOCX/PPTX/XLSX; Office via COM automation is an advanced alternative.
Workflow
Office Documents → PDF (most common)
Use LibreOffice headless mode. Works for DOCX, PPTX, XLSX, ODP, ODT, and any format LibreOffice opens.
Notes:
- Output file is placed in
--outdirwith the same base name and new extension - For batch, run one
libreofficeprocess — do NOT spawn multiple instances in parallel (LibreOffice uses a single user profile lock) - If LibreOffice is open as a GUI app, close it first or use
--norestoreflag
PDF → Images / Images → PDF
Use ImageMagick for image-PDF interchange:
Note: On some systems ImageMagick's PDF support requires ghostscript. If conversion fails with a policy error, check /etc/ImageMagick-*/policy.xml and ensure PDF is not restricted.
PDF Operations — Merge, Split, Rotate
Prefer pdftk when available (simpler syntax). Fall back to ghostscript if pdftk is not installed.
Merge PDFs:
Split PDF by page range:
Rotate pages:
Encrypt PDF (add password):
Decrypt PDF (remove password):
OCR — Extract Text from Scanned Documents
Use Tesseract. Input must be an image (PNG, JPG, TIFF) or a PDF that ImageMagick can rasterize first.
For multi-page scanned PDFs:
Tool Routing Decision Table
| Task | Primary tool | Fallback | |
|---|---|---|---|
| Office → PDF | LibreOffice | None (LibreOffice is the standard) | |
| Office → HTML | LibreOffice | None | |
| PDF → images | ImageMagick | ghostscript (gs -sDEVICE=png16m) | |
| Images → PDF | ImageMagick | ghostscript | |
| Merge PDFs | pdftk | ghostscript | |
| Split PDF | pdftk | ghostscript | |
| Rotate PDF | pdftk | ghostscript | |
| Encrypt PDF | pdftk | None | |
| Decrypt PDF | pdftk | None | |
| OCR | tesseract | None |
Comparison: When to Use document-converter vs Alternatives
| Tool | Best for | |
|---|---|---|
document-converter | Office → PDF, PDF operations (merge/split/rotate/encrypt), OCR, image ↔ PDF | |
docling-converter | PDF/Office → structured Markdown or JSON; layout-aware content extraction | |
pandoc | Markdown ↔ HTML ↔ LaTeX ↔ DOCX; lightweight lightweight text format conversions | |
pptx-translator | Translating PowerPoint files between languages |
Critical Rules
- NEVER start a batch LibreOffice conversion with multiple parallel processes — LibreOffice uses a single user-profile lock and parallel instances will crash
- ALWAYS run Step 0 Discovery to confirm the required tool is installed before invoking it
- ALWAYS suggest the correct install command for the user's OS when a tool is missing
- NEVER use cloudconvert, external APIs, or paid services — this skill is fully offline
- ALWAYS prefer pdftk over ghostscript for PDF operations when both are available (simpler, safer syntax)
- ALWAYS specify output directory explicitly to avoid writing files to unexpected locations
Example Usage
Convert PPTX to PDF:
Merge 3 PDFs:
OCR a scanned image (Portuguese):
PDF pages to PNG images:
Encrypt a PDF:
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/document-converter/SKILL.md
Popularity
- Repository stars
- 39
- Repository forks
- 5
- 7-day trend score
- 18
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 20 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ericgandrade/claude-superskills/document-converter)