Marketplace file-converter
This skill handles file format conversions across documents (PDF, DOCX,
install
source · Clone the upstream repo
git clone https://github.com/aiskillstore/marketplace
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/aiskillstore/marketplace "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/89jobrien/file-converter" ~/.claude/skills/aiskillstore-marketplace-file-converter && rm -rf "$T"
manifest:
skills/89jobrien/file-converter/SKILL.mdsource content
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 | or |
| HTML | Markdown | or |
| HTML | or (requires wkhtmltopdf) | |
| Text | or | |
| DOCX | Markdown | |
| DOCX | (Windows/macOS) or LibreOffice CLI | |
| Markdown | Convert via HTML first, then to PDF |
Data Files
| From | To | Recommended Library |
|---|---|---|
| JSON | YAML | |
| YAML | JSON | |
| JSON | CSV | or stdlib + |
| CSV | JSON | or stdlib + |
| JSON | TOML | / (read) + (write) |
| XML | JSON | |
| JSON | XML | or |
Images
| From | To | Recommended Library |
|---|---|---|
| PNG/JPG/WebP/GIF | Any raster | (PIL) |
| SVG | PNG/JPG | or + |
| PNG | SVG | (CLI) for tracing, limited fidelity |
Workflow
- Identify source format (from file extension or user statement)
- Identify target format
- Check
for format-specific guidancereferences/ - 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/:
- PDF handling, encoding issues, styling preservationreferences/document-conversions.md
- Schema handling, type coercion, nested structuresreferences/data-conversions.md
- Quality settings, transparency, color profilesreferences/image-conversions.md
Consult these references when handling edge cases or when the user has specific quality/fidelity requirements.