Agent skill
file-converter
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.
Install this agent skill to your Project
npx add-skill https://github.com/aiskillstore/marketplace/tree/main/skills/89jobrien/file-converter
SKILL.md
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.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
perigon-backend
Perigon ASP.NET Core + EF Core + Aspire conventions
perigon-agent
Pointers for Copilot/agents to apply Perigon conventions
perigon-angular
Angular 21+ standalone/Material/signal conventions for Perigon WebApp
fastapi-mastery
Comprehensive FastAPI development skill covering REST API creation, routing, request/response handling, validation, authentication, database integration, middleware, and deployment. Use when working with FastAPI projects, building APIs, implementing CRUD operations, setting up authentication/authorization, integrating databases (SQL/NoSQL), adding middleware, handling WebSockets, or deploying FastAPI applications. Triggered by requests involving .py files with FastAPI code, API endpoint creation, Pydantic models, or FastAPI-specific features.
context7-efficient
Token-efficient library documentation fetcher using Context7 MCP with 86.8% token savings through intelligent shell pipeline filtering. Fetches code examples, API references, and best practices for JavaScript, Python, Go, Rust, and other libraries. Use when users ask about library documentation, need code examples, want API usage patterns, are learning a new framework, need syntax reference, or troubleshooting with library-specific information. Triggers include questions like "Show me React hooks", "How do I use Prisma", "What's the Next.js routing syntax", or any request for library/framework documentation.
browser-use
Browser automation using Playwright MCP. Navigate websites, fill forms, click elements, take screenshots, and extract data. Use when tasks require web browsing, form submission, web scraping, UI testing, or any browser interaction.
Didn't find tool you were looking for?