スキル一覧に戻る
aiskillstore

file-converter

by aiskillstore

file-converterは、other分野における実用的なスキルです。複雑な課題への対応力を強化し、業務効率と成果の質を改善します。

102🍴 3📅 2026年1月23日
GitHubで見るManusで実行

SKILL.md


name: file-converter description: 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. author: Joseph OBrien status: unpublished updated: '2025-12-23' version: 1.0.1 tag: skill type: skill

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

FromToRecommended Library
MarkdownHTMLmarkdown or mistune
HTMLMarkdownmarkdownify or html2text
HTMLPDFweasyprint or pdfkit (requires wkhtmltopdf)
PDFTextpypdf or pdfplumber
DOCXMarkdownmammoth
DOCXPDFdocx2pdf (Windows/macOS) or LibreOffice CLI
MarkdownPDFConvert via HTML first, then to PDF

Data Files

FromToRecommended Library
JSONYAMLpyyaml
YAMLJSONpyyaml
JSONCSVpandas or stdlib csv + json
CSVJSONpandas or stdlib csv + json
JSONTOMLtomli/tomllib (read) + tomli-w (write)
XMLJSONxmltodict
JSONXMLdicttoxml or xmltodict.unparse

Images

FromToRecommended Library
PNG/JPG/WebP/GIFAny rasterPillow (PIL)
SVGPNG/JPGcairosvg or svglib + reportlab
PNGSVGpotrace (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.

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

+5
最近の活動

3ヶ月以内に更新

+5
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

レビュー

💬

レビュー機能は近日公開予定です