jpskill.com
📄 ドキュメント コミュニティ

file-converter

PDFやDOCXなどの文書、JSONやCSVなどのデータ、PNGやJPGなどの画像ファイルを、指定された形式へ変換するSkill。

📜 元の英語説明(参考)

This skill handles file format conversions across documents (PDF, DOCX, Markdown, HTML, TXT), data files (JSON, CSV, YAML, XML, TOML), and images (PNG, JPG, WebP, SVG, GIF). Use when the user requests converting, transforming, or exporting files between formats. Generates conversion code dynamically based on the specific request.

🇯🇵 日本人クリエイター向け解説

一言でいうと

PDFやDOCXなどの文書、JSONやCSVなどのデータ、PNGやJPGなどの画像ファイルを、指定された形式へ変換するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o file-converter.zip https://jpskill.com/download/6911.zip && unzip -o file-converter.zip && rm file-converter.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/6911.zip -OutFile "$d\file-converter.zip"; Expand-Archive "$d\file-converter.zip" -DestinationPath $d -Force; ri "$d\file-converter.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して file-converter.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → file-converter フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-17
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

ファイルコンバーター

概要

ドキュメント、データファイル、画像という3つのカテゴリ間でファイルをフォーマット変換します。各変換リクエストに対して、適切なライブラリを選択し、エッジケースを処理しながらPythonコードを動的に生成します。

変換カテゴリ

ドキュメント

変換元 変換先 推奨ライブラリ
Markdown HTML markdown または mistune
HTML Markdown markdownify または html2text
HTML PDF weasyprint または pdfkit (wkhtmltopdfが必要)
PDF Text pypdf または pdfplumber
DOCX Markdown mammoth
DOCX PDF docx2pdf (Windows/macOS) または LibreOffice CLI
Markdown PDF まずHTMLに変換し、次にPDFに変換

データファイル

変換元 変換先 推奨ライブラリ
JSON YAML pyyaml
YAML JSON pyyaml
JSON CSV pandas または標準ライブラリ csv + json
CSV JSON pandas または標準ライブラリ csv + json
JSON TOML tomli/tomllib (読み込み) + tomli-w (書き込み)
XML JSON xmltodict
JSON XML dicttoxml または xmltodict.unparse

画像

変換元 変換先 推奨ライブラリ
PNG/JPG/WebP/GIF 任意のラスター Pillow (PIL)
SVG PNG/JPG cairosvg または svglib + reportlab
PNG SVG potrace (CLI) によるトレース、忠実度は限定的

ワークフロー

  1. 変換元フォーマットを特定します(ファイル拡張子またはユーザーの指定から)
  2. 変換先フォーマットを特定します
  3. references/ でフォーマット固有のガイダンスを確認します
  4. 推奨ライブラリを使用して変換コードを生成します
  5. エッジケース(エンコーディング、透過性、ネストされた構造)を処理します
  6. 変換を実行し、結果を報告します

クイックパターン

データ: JSONからYAML

import json
import yaml

with open("input.json") as f:
    data = json.load(f)

with open("output.yaml", "w") as f:
    yaml.dump(data, f, default_flow_style=False, allow_unicode=True)

データ: CSVからJSON

import csv
import json

with open("input.csv") as f:
    reader = csv.DictReader(f)
    data = list(reader)

with open("output.json", "w") as f:
    json.dump(data, f, indent=2)

ドキュメント: MarkdownからHTML

import markdown

with open("input.md") as f:
    md_content = f.read()

html = markdown.markdown(md_content, extensions=["tables", "fenced_code"])

with open("output.html", "w") as f:
    f.write(html)

画像: PNGからWebP

from PIL import Image

img = Image.open("input.png")
img.save("output.webp", "WEBP", quality=85)

画像: SVGからPNG

import cairosvg

cairosvg.svg2png(url="input.svg", write_to="output.png", scale=2)

リソース

複雑な変換に関する詳細なガイダンスは references/ にあります。

  • references/document-conversions.md - PDF処理、エンコーディングの問題、スタイルの保持
  • references/data-conversions.md - スキーマ処理、型強制、ネストされた構造
  • references/image-conversions.md - 品質設定、透過性、カラープロファイル

エッジケースを処理する場合や、ユーザーが特定の品質/忠実度要件を持っている場合は、これらのリファレンスを参照してください。

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

File Converter

Overview

Convert files between formats across three categories: documents, data files, and images. Generate Python code dynamically for each conversion request, selecting appropriate libraries and handling edge cases.

Conversion Categories

Documents

From To Recommended Library
Markdown HTML markdown or mistune
HTML Markdown markdownify or html2text
HTML PDF weasyprint or pdfkit (requires wkhtmltopdf)
PDF Text pypdf or pdfplumber
DOCX Markdown mammoth
DOCX PDF docx2pdf (Windows/macOS) or LibreOffice CLI
Markdown PDF Convert via HTML first, then to PDF

Data Files

From To Recommended Library
JSON YAML pyyaml
YAML JSON pyyaml
JSON CSV pandas or stdlib csv + json
CSV JSON pandas or stdlib csv + json
JSON TOML tomli/tomllib (read) + tomli-w (write)
XML JSON xmltodict
JSON XML dicttoxml or xmltodict.unparse

Images

From To Recommended Library
PNG/JPG/WebP/GIF Any raster Pillow (PIL)
SVG PNG/JPG cairosvg or svglib + reportlab
PNG SVG potrace (CLI) for tracing, limited fidelity

Workflow

  1. Identify source format (from file extension or user statement)
  2. Identify target format
  3. Check references/ for format-specific guidance
  4. Generate conversion code using recommended library
  5. Handle edge cases (encoding, transparency, nested structures)
  6. Execute conversion and report results

Quick Patterns

Data: JSON to YAML

import json
import yaml

with open("input.json") as f:
    data = json.load(f)

with open("output.yaml", "w") as f:
    yaml.dump(data, f, default_flow_style=False, allow_unicode=True)

Data: CSV to JSON

import csv
import json

with open("input.csv") as f:
    reader = csv.DictReader(f)
    data = list(reader)

with open("output.json", "w") as f:
    json.dump(data, f, indent=2)

Document: Markdown to HTML

import markdown

with open("input.md") as f:
    md_content = f.read()

html = markdown.markdown(md_content, extensions=["tables", "fenced_code"])

with open("output.html", "w") as f:
    f.write(html)

Image: PNG to WebP

from PIL import Image

img = Image.open("input.png")
img.save("output.webp", "WEBP", quality=85)

Image: SVG to PNG

import cairosvg

cairosvg.svg2png(url="input.svg", write_to="output.png", scale=2)

Resources

Detailed guidance for complex conversions is in references/:

  • references/document-conversions.md - PDF handling, encoding issues, styling preservation
  • references/data-conversions.md - Schema handling, type coercion, nested structures
  • references/image-conversions.md - Quality settings, transparency, color profiles

Consult these references when handling edge cases or when the user has specific quality/fidelity requirements.