format-converter
GitHub用于在本地VM环境中进行文档、图像及音视频格式转换。支持通过Pandoc处理文档,Pillow处理图像,FFmpeg处理音视频,确保高质量转换并遵循特定最佳实践。
Trigger Scenarios
Install
npx skills add AFK-surf/OpenBridge --skill format-converter -g -y
SKILL.md
Frontmatter
{
"name": "format-converter",
"metadata": {
"icon": "play.tv.fill",
"color": "pink",
"displayName": "Convert Master",
"placeholder": "Upload a file to convert"
},
"description": "Convert files between formats. Use for Document conversion, Image format conversion, and Audio\/Video format conversion."
}
File Format Conversion
Execution Environment
Run format conversion commands in the local VM environment by default. Do not perform conversion work on local macOS or a cloud VM unless the user explicitly asks for that environment.
Workflow Decision
| Task | Tool | Reference |
|---|---|---|
| Document conversion | pandoc | document-convert.md |
| Image format conversion | Python (Pillow) | image-convert.md |
| Audio/video conversion | ffmpeg | av-convert.md |
Quick Reference
Document Conversion
Read references/document-convert.md for detailed workflow.
Key points:
- PDF generation: ALWAYS use
--pdf-engine=weasyprint(lightweight, auto-installed) - Pandoc supports markdown, HTML, PDF, DOCX, LaTeX, and many more formats
# PDF from markdown
pandoc input.md -o output.pdf --pdf-engine=weasyprint
# DOCX from HTML
pandoc input.html -o output.docx
Image Conversion
Read references/image-convert.md for detailed workflow.
Key points:
- Use
Image.LANCZOSfor any resize operation (prevents color banding/aliasing) - Convert RGBA to RGB before saving as JPEG
- Preserve EXIF metadata when possible
# Dependencies
apt install python3-pil python3-pillow-heif
Audio/Video Conversion
Read references/av-convert.md for detailed workflow.
Key points:
- Use
-c copywhen only changing container format (fast, lossless) - Use
flags=lanczosin scale filters for best quality - Use
-crffor quality-based encoding
Check ffmpeg available before using it.
Version History
- a9ca905 Current 2026-07-24 11:34


