← Browse

@demerzels-lab/media-converter

A

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).

skillclaude

Install

agr install @demerzels-lab/media-converter --target claude

Writes 3 files into .claude/skills/, pinned to git-6c265f7a.

  • .claude/skills/media-converter/SKILL.md
  • .claude/skills/media-converter/_meta.json
  • .claude/skills/media-converter/index.js

Document

Media Converter Skill

Description

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"}

Trustgrade A

  • passBody integrity

    Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.

  • passType matchnot applicable to this artifact type

    Whether the artifact is really the kind of thing its metadata claims it is.

  • passFreshness

    How long since the source repository was last pushed to.

  • passPrompt injection

    Scans the artifact's own text for instructions aimed at your agent rather than at you.

  • passLicense

    Whether the source repository declares an SPDX license permissive enough to redistribute.

How the grade is calculated

Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:

  • Aevery check passed
  • Bone warning
  • Ctwo warnings
  • Dprompt injection or body integrity failed, or three warnings
  • Fone of those failed, and something else is wrong

These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.

Versions

  • git-6c265f7a2e7c2026-07-31