Detects media file types via magic bytes and fixes file extensions to ensure compatibility with Gemini (which rejects application/octet-stream). Handles basic conversion logic (placeholder for future ffmpeg support).
Usage
# Detect MIME type and return JSON
node skills/media-converter/index.js detect --file <path>
# Fix extension based on detected MIME (renames file if needed)
node skills/media-converter/index.js fix --file <path>
Examples
# Check a file masked as .bin
node skills/media-converter/index.js detect --file /tmp/unknown.bin
# Output: {"mime": "image/gif", "ext": "gif"}
# Rename a file to match its content
node skills/media-converter/index.js fix --file /tmp/unknown.bin
# Output: {"original": "/tmp/unknown.bin", "fixed": "/tmp/unknown.gif", "mime": "image/gif"}
1---2name: media-converter3description: Media Converter Skill4---5# Media Converter Skill67## Description8Detects media file types via magic bytes and fixes file extensions to ensure compatibility with Gemini (which rejects `application/octet-stream`). Handles basic conversion logic (placeholder for future ffmpeg support).910## Usage11```bash12# Detect MIME type and return JSON13node skills/media-converter/index.js detect --file <path>1415# Fix extension based on detected MIME (renames file if needed)16node skills/media-converter/index.js fix --file <path>17```1819## Examples20```bash21# Check a file masked as .bin22node skills/media-converter/index.js detect --file /tmp/unknown.bin23# Output: {"mime": "image/gif", "ext": "gif"}2425# Rename a file to match its content26node skills/media-converter/index.js fix --file /tmp/unknown.bin27# Output: {"original": "/tmp/unknown.bin", "fixed": "/tmp/unknown.gif", "mime": "image/gif"}28```
Run npx skillmds@latest add demerzels-lab/media-converter in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Media Converter Skill It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Demerzels-lab (@demerzels-lab) published this skill. Their other Agent Skills are listed on their SkillMD profile.