agentleFS
danielrosehilldanielrosehill/Claude-Image-Production-Plugin/skills/convert-to-avif/SKILL.md

convert-to-avif

Skill21 starsChanged 9 days agoMITView on GitHub

Use when the user wants AVIF output — modern web format with ~30% better compression than WebP at the same visual quality, and ~50% better than JPEG. Wraps `avifenc`. Companion to `convert-to-webp`. Best target for new web work; check browser support if delivering to ancient clients.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not use this skill when:

    line 16
  2. Very specific:

    Verify avifenc is on PATH.

    line 34
  3. Very specific:

    If --keep-exif was set, post-process:

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Convert to AVIF

Encode JPEG/PNG/TIFF to AVIF. AVIF beats WebP on compression ratio and supports 10/12-bit, HDR, and lossless modes. Browser support is universal as of 2024 (Chrome 85+, Firefox 113+, Safari 16.4+).

When to use

  • Web-prep where modern browser support is fine.
  • Archival of high-bit-depth photos (10/12-bit AVIF preserves more than JPEG).
  • Pre-step inside web-ready orchestrator.

Do not use this skill when:

  • Output must work in Safari <16.4 / IE / very old Android browsers — fall back to WebP or JPEG.
  • Source is already AVIF — no point re-encoding.
  • You need lossless re-encoding of a JPEG that should remain bit-exact-decodable — that's convert-to-jxl's unique trick, not AVIF's.

Inputs

  1. Input — file or directory. Required.
  2. Quality — avifenc -q N (0–100). Default 60 (visually equivalent to JPEG q82, much smaller). 80 for archival; 45 for aggressive.
  3. Speed/effort — avifenc -s <0..10>. Default 6 (balanced). 0 is best compression but very slow; 10 is fast but bigger files.
  4. Lossless — --lossless. Enables lossless mode (ignores quality). For exact archival of PNG.
  5. Bit depth — --depth 8|10|12. Default 8. Use 10 for HDR or 16-bit source.
  6. Output dir — default: <input-dir>/avif/. Skill never overwrites originals.
  7. Recursive — --recursive for directory descent.
  8. Preserve EXIF — default off (web-prep assumption). --keep-exif to copy EXIF over via exiftool.

Procedure

  1. Verify avifenc is on PATH. If missing, point at install-deps.
  2. Enumerate inputs (jpg, jpeg, png, tiff — skip others with note).
  3. For each file:

    avifenc -q <quality> -s <speed> [--lossless] [--depth <n>] "<input>" "<output>"

    Per-file. avifenc is single-threaded per encode but accepts --jobs N for tile-parallel — useful on large images. For batch parallelism, use xargs -P <ncpu>.

  4. If --keep-exif was set, post-process:

    exiftool -tagsfromfile "<input>" -all:all "<output>" -overwrite_original
  5. Track size deltas.

Output

  • AVIF files at <output-dir>/.
  • Summary:
    • Files processed / failed.
    • Total: <orig-MB> → <new-MB> (<pct>% saved).
    • Quality estimate per file (using --qcolor if requested).

Notes

  • AVIF encoding is slow compared to JPEG/WebP. Speed 6 is ~2–4× slower than cwebp. Speed 0 can be 30× slower. Pick 6 unless archiving.
  • --speed 6 --quality 60 is the de facto web-prep default — quality matches q82 JPEG at roughly half the bytes.
  • Animation: avifenc supports animated AVIF from PNG sequences (avifenc -i input1.png -i input2.png ...) but this skill focuses on still images.
  • Decode support outside browsers is uneven (older image viewers may not decode). Check before mass-converting an archive.
  • For guaranteed lossless re-encode of a JPEG (bit-exact reversible), use convert-to-jxl instead — JXL has a unique lossless-JPEG mode.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.