Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计异常

document-converter文件转换器

Agent Skill

document-converter 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

220

周安装

9

GitHub Stars

31

下载量

71
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:document-converter(文件转换器)
来源仓库:https://github.com/ericgandrade/claude-superskills
仓库路径:skills/document-converter
安装命令:
npx skills add https://github.com/ericgandrade/claude-superskills --skill document-converter
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/ericgandrade/claude-superskills --skill document-converter

简介

该技能离线转换 Office 与 PDF 格式,支持 OCR 与图像互转,无需联网。

  • 适用于本地文档处理、隐私敏感场景或 API 受限环境下的格式转换。
  • 集成 LibreOffice、Tesseract 与 Ghostscript 等开源工具链。
  • 安装前请确保系统已安装相关命令行工具,并预留足够磁盘空间。
  • document-converter 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.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-converter instead)

Step 0: Discovery — Detect Available Tools

Before any conversion, detect which tools are installed and identify the operating system:

# Detect OS
uname -s   # Darwin = macOS, Linux = Linux; on Windows use 'ver' or check $OS

# Check each tool
libreoffice --version 2>/dev/null || echo "NOT FOUND"
gs --version 2>/dev/null || echo "NOT FOUND"
pdftk --version 2>/dev/null || echo "NOT FOUND"
tesseract --version 2>/dev/null || echo "NOT FOUND"
convert -version 2>/dev/null || echo "NOT FOUND"   # ImageMagick

If a required tool is missing, show the install command for the user's OS before proceeding:

ToolmacOSLinux (apt)Windows
LibreOfficebrew install --cask libreofficesudo apt install libreofficewinget install TheDocumentFoundation.LibreOffice
Ghostscriptbrew install ghostscriptsudo apt install ghostscriptwinget install ArtifexSoftware.GhostScript
pdftkbrew install pdftk-javasudo apt install pdftkwinget install PDFTechnologies.PDFtk
Tesseractbrew install tesseractsudo apt install tesseract-ocrwinget install UB-Mannheim.TesseractOCR
ImageMagickbrew install imagemagicksudo apt install imagemagickwinget 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.

# Convert single file to PDF in the same directory
libreoffice --headless --convert-to pdf "/path/to/file.pptx" --outdir "/path/to/output/"

# Convert to HTML
libreoffice --headless --convert-to html "/path/to/file.docx" --outdir "/path/to/output/"

# Batch: convert all PPTX in a directory
libreoffice --headless --convert-to pdf /path/to/folder/*.pptx --outdir /path/to/output/

Notes:

  • Output file is placed in --outdir with the same base name and new extension
  • For batch, run one libreoffice process — 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 --norestore flag

PDF → Images / Images → PDF

Use ImageMagick for image-PDF interchange:

# PDF pages → PNG (one file per page)
convert -density 150 "/path/to/doc.pdf" "/path/to/output/page_%03d.png"

# PDF pages → JPG with quality control
convert -density 150 "/path/to/doc.pdf" -quality 85 "/path/to/output/page_%03d.jpg"

# Single image → PDF
convert "/path/to/image.png" "/path/to/output/document.pdf"

# Multiple images → single PDF
convert img1.png img2.jpg img3.tiff "/path/to/output/combined.pdf"

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:

# pdftk (preferred)
pdftk file1.pdf file2.pdf file3.pdf cat output merged.pdf

# ghostscript (fallback)
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=merged.pdf file1.pdf file2.pdf file3.pdf

Split PDF by page range:

# pdftk — extract pages 1-3 and 5
pdftk input.pdf cat 1-3 5 output extracted.pdf

# ghostscript — extract pages 2 to 5
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -dFirstPage=2 -dLastPage=5 -sOutputFile=extracted.pdf input.pdf

Rotate pages:

# pdftk — rotate all pages 90° clockwise
pdftk input.pdf rotate 1-endeast output rotated.pdf

# pdftk — rotate specific page (page 3) 180°
pdftk input.pdf rotate 3south output rotated.pdf

Encrypt PDF (add password):

pdftk input.pdf output secured.pdf user_pw "userpass" owner_pw "ownerpass"

Decrypt PDF (remove password):

pdftk secured.pdf input_pw "password" output decrypted.pdf

OCR — Extract Text from Scanned Documents

Use Tesseract. Input must be an image (PNG, JPG, TIFF) or a PDF that ImageMagick can rasterize first.

# OCR a single image → searchable text file
tesseract "/path/to/scan.png" "/path/to/output/result"
# Output: result.txt

# OCR with language specification (Portuguese example)
tesseract "/path/to/scan.png" output -l por

# OCR → searchable PDF (requires tesseract with pdf support)
tesseract "/path/to/scan.png" output -l eng pdf
# Output: output.pdf

# OCR a scanned PDF: rasterize first, then OCR
convert -density 300 "scan.pdf" "scan_page_%03d.tiff"
tesseract "scan_page_000.tiff" output -l eng pdf

For multi-page scanned PDFs:

# Rasterize all pages
convert -density 300 "scan.pdf" "page_%03d.tiff"

# OCR each page and merge results
for f in page_*.tiff; do
  tesseract "$f" "${f%.tiff}" -l eng pdf
done
pdftk page_*.pdf cat output final_ocr.pdf

Tool Routing Decision Table

TaskPrimary toolFallback
Office → PDFLibreOfficeNone (LibreOffice is the standard)
Office → HTMLLibreOfficeNone
PDF → imagesImageMagickghostscript (gs -sDEVICE=png16m)
Images → PDFImageMagickghostscript
Merge PDFspdftkghostscript
Split PDFpdftkghostscript
Rotate PDFpdftkghostscript
Encrypt PDFpdftkNone
Decrypt PDFpdftkNone
OCRtesseractNone

Comparison: When to Use document-converter vs Alternatives

ToolBest for
document-converterOffice → PDF, PDF operations (merge/split/rotate/encrypt), OCR, image ↔ PDF
docling-converterPDF/Office → structured Markdown or JSON; layout-aware content extraction
pandocMarkdown ↔ HTML ↔ LaTeX ↔ DOCX; lightweight lightweight text format conversions
pptx-translatorTranslating 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:

libreoffice --headless --convert-to pdf presentation.pptx --outdir ./output/

Merge 3 PDFs:

pdftk report.pdf appendix.pdf cover.pdf cat output final.pdf

OCR a scanned image (Portuguese):

tesseract scan.png resultado -l por

PDF pages to PNG images:

convert -density 150 document.pdf page_%03d.png

Encrypt a PDF:

pdftk sensitive.pdf output protected.pdf user_pw "secret123"

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.29%
按下载量换算26

Claude

27.46%
按下载量换算19

Cursor

17.7%
按下载量换算13

Gemini CLI

9.1%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills