重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
npx skills add https://github.com/89jobrien/steve --skill file-converter在三大类别之间转换文件格式:文档、数据文件和图像。为每个转换请求动态生成 Python 代码,选择合适的库并处理边缘情况。
| 从 | 到 | 推荐库 |
|---|---|---|
| Markdown | HTML | markdown 或 mistune |
| HTML | Markdown | markdownify 或 html2text |
| HTML | weasyprint 或 (需要 wkhtmltopdf) |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
pdfkit| 文本 | pypdf 或 pdfplumber |
| DOCX | Markdown | mammoth |
| DOCX | docx2pdf (Windows/macOS) 或 LibreOffice CLI |
| Markdown | 先转换为 HTML,再转换为 PDF |
| 从 | 到 | 推荐库 |
|---|---|---|
| JSON | YAML | pyyaml |
| YAML | JSON | pyyaml |
| JSON | CSV | pandas 或 stdlib csv + json |
| CSV | JSON | pandas 或 stdlib 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/ 目录中针对特定格式的指南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)
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)
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)
from PIL import Image
img = Image.open("input.png")
img.save("output.webp", "WEBP", quality=85)
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 - 质量设置、透明度、颜色配置文件处理边缘情况或用户有特定质量/保真度要求时,请查阅这些参考资料。
每周安装量
29
代码仓库
GitHub 星标数
4
首次出现
2026年1月24日
安全审计
安装于
opencode26
codex23
gemini-cli23
github-copilot20
cursor20
kimi-cli18
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.
| 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 |
| From | To | Recommended Library |
|---|---|---|
| JSON | YAML | pyyaml |
| YAML | JSON | pyyaml |
| JSON | CSV | pandas or stdlib csv + json |
| CSV | JSON | pandas or stdlib csv + |
| 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 |
references/ for format-specific guidanceimport 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)
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)
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)
from PIL import Image
img = Image.open("input.png")
img.save("output.webp", "WEBP", quality=85)
import cairosvg
cairosvg.svg2png(url="input.svg", write_to="output.png", scale=2)
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 profilesConsult these references when handling edge cases or when the user has specific quality/fidelity requirements.
Weekly Installs
29
Repository
GitHub Stars
4
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykPass
Installed on
opencode26
codex23
gemini-cli23
github-copilot20
cursor20
kimi-cli18
Caveman Compress:AI文件压缩工具,优化Claude输入令牌,提升自然语言处理效率
6,200 周安装
json| JSON | TOML | tomli/tomllib (read) + tomli-w (write) |
| XML | JSON | xmltodict |
| JSON | XML | dicttoxml or xmltodict.unparse |