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本体の挙動とは独立した参考情報です。
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
ファイルコンバーター
概要
ドキュメント、データファイル、画像という3つのカテゴリ間でファイルをフォーマット変換します。各変換リクエストに対して、適切なライブラリを選択し、エッジケースを処理しながらPythonコードを動的に生成します。
変換カテゴリ
ドキュメント
| 変換元 | 変換先 | 推奨ライブラリ |
|---|---|---|
| Markdown | HTML | markdown または mistune |
| HTML | Markdown | markdownify または html2text |
| HTML | weasyprint または pdfkit (wkhtmltopdfが必要) |
|
| Text | pypdf または pdfplumber |
|
| DOCX | Markdown | mammoth |
| DOCX | docx2pdf (Windows/macOS) または LibreOffice CLI |
|
| Markdown | まず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) によるトレース、忠実度は限定的 |
ワークフロー
- 変換元フォーマットを特定します(ファイル拡張子またはユーザーの指定から)
- 変換先フォーマットを特定します
references/でフォーマット固有のガイダンスを確認します- 推奨ライブラリを使用して変換コードを生成します
- エッジケース(エンコーディング、透過性、ネストされた構造)を処理します
- 変換を実行し、結果を報告します
クイックパターン
データ: 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 | weasyprint or pdfkit (requires wkhtmltopdf) |
|
| Text | pypdf or pdfplumber |
|
| DOCX | Markdown | mammoth |
| DOCX | docx2pdf (Windows/macOS) or LibreOffice CLI |
|
| Markdown | 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
- Identify source format (from file extension or user statement)
- Identify target format
- Check
references/for format-specific guidance - Generate conversion code using recommended library
- Handle edge cases (encoding, transparency, nested structures)
- 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 preservationreferences/data-conversions.md- Schema handling, type coercion, nested structuresreferences/image-conversions.md- Quality settings, transparency, color profiles
Consult these references when handling edge cases or when the user has specific quality/fidelity requirements.