Document Converterのロゴ

Document Converter

コミュニティ
ericgandrade
document-converter

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.

概要

公開者ericgandrade
リポジトリclaude-superskills
スキル名document-converter
スター
86
フォーク
16
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    ericgandradeがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Document Converter」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/ericgandrade/claude-superskills/tree/main/skills/document-converter
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ericgandrade/claude-superskills.git /tmp/claude-superskills
mkdir -p .claude/skills
cp -r /tmp/claude-superskills/skills/document-converter .claude/skills/document-converter
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでDocument Converterを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にDocument Converterを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Document Converterは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込む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:

bash
# 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.

bash
# 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:

bash
# 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:

bash
# 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:

bash
# 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:

bash
# 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):

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

Decrypt PDF (remove password):

bash
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.

bash
# 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:

bash
# 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:

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

Merge 3 PDFs:

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

OCR a scanned image (Portuguese):

bash
tesseract scan.png resultado -l por

PDF pages to PNG images:

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

Encrypt a PDF:

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

よくある質問

AIスキル「Document Converter」では何ができますか?

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.

TypingMindでDocument Converterを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Document Converterはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにDocument Converterをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/ericgandrade/claude-superskills/tree/main/skills/document-converterを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Document Converterを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Document Converterで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもDocument Converterを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Document Converter」は無料ですか?

はい。ericgandradeがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇