- Home
- Skills
- Georgekhananaev
- Claude Skills Vault
- File Converter
file-converter_skill
- Python
9
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill georgekhananaev/claude-skills-vault --skill file-converter- SKILL.md9.1 KB
Overview
This skill converts and transforms files across images, markup, and data formats with single-file and batch support. It streamlines common tasks like image resizing and format conversion, markdown to PDF/HTML generation, and bidirectional data format transforms. Cross-platform utilities and consistent CLI patterns make it suitable for automation in build and documentation pipelines.
How this skill works
Each script follows a consistent CLI pattern: single file or directory/glob input with an optional output directory and explicit format flags. Image tools use Pillow (optional pillow-heif) for conversions, resizing, fit modes and EXIF fixes. Markdown and HTML scripts render and convert using markdown, weasyprint/pdfkit and markdownify/bs4. Data converters rely on format-specific libs (pyyaml, tomli-w, xmltodict) to translate between CSV/JSON/YAML/TOML/XML. Base64 and encoding utilities support stdin/stdout and sensible error handling.
When to use it
- Convert photos to web-friendly formats (WebP/AVIF) and generate thumbnails in bulk
- Generate PDF reports or HTML sites from markdown with selectable themes
- Transform CSV exports into JSON/YAML/TOML for API imports or config migration
- Convert SVG icons to multiple raster sizes or embed rasters into SVG wrappers
- Encode or decode files as base64 data URIs for embedding
- Detect and fix text encoding issues or batch-convert files to UTF-8
Best practices
- Install only the deps needed per task to keep environments lean (see per-task deps)
- Use batch mode with --output-dir to avoid accidental overwrites on single-file runs
- Prefer weasyprint when available for Markdown->PDF; fallback to pdfkit only if wkhtmltopdf is installed
- Use explicit --format flags for ambiguous batch inputs (directories/globs)
- Test transforms on a small sample before running large batches to validate fit modes and error modes
Example use cases
- Web optimization: convert photos to WebP at 1200px and create 300px cover thumbnails for a site
- Docs pipeline: render a docs directory to HTML with a GitHub theme and output a PDF book using the report theme
- Data migration: convert legacy CSV exports into JSON for ingestion into a modern API
- Icon generation: produce multi-size raster icons from a single SVG for mobile and web assets
- Repair text corpora: detect mixed encodings and convert files to UTF-8 with replace/ignore strategies
FAQ
Scripts detect missing optional dependencies at runtime, print a clear error and exit; batch runs continue for other files where possible.
Can I stream input via stdin?
Yes. md_to_html.py and base64_codec.py accept - as stdin input for piping workflows.
How are image fit modes handled?
Fit modes include contain, cover, fill, inside and outside. Contain preserves aspect ratio, cover fills and crops, fill stretches to exact size.