agentleFS
danielrosehilldanielrosehill/Claude-Image-Production-Plugin/skills/web-ready/SKILL.md

web-ready

Skill21 starsChanged 7 days agoMITView on GitHub

Use when the user wants to take a folder of images (any mix of HEIC, RAW, PNG, JPEG, TIFF, WebP) and produce a web-ready set — EXIF stripped, resized to a sensible max dimension, encoded in modern formats (AVIF + WebP, with JPEG fallback), and optimised for size. End-to-end orchestrator. Mirrors `audio-production:polish`.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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 17
  2. Very specific:

    Pre-flight: verify install-deps shows green for: magick/convert, exiftool, vipsthumbnail, avifenc, cwebp (already present for existing …

    line 36
  3. Distinctive:

    Use lossless intermediate to avoid double-compression.

    line 58
  4. Distinctive:

    Run encodes in parallel — they're independent.

    line 66
  5. Very specific:

    Cleanup: delete <staged> intermediates.

    line 73

≈ “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

Web-Ready (orchestrator)

One-shot pipeline: ingest anything → strip EXIF → resize → encode to web formats → optimise. The "make this folder uploadable" skill.

When to use

  • Photos coming off a phone (HEIC) destined for a blog.
  • Camera RAW exports being prepped for an online gallery.
  • A mixed folder of screenshots/photos that needs to ship to the web.
  • Pre-step before image upload to any CMS, S3 bucket, or Cloudflare R2.

Do not use this skill when:

  • The user wants archival output → keep originals; use the targeted skills (convert-to-jxl, optimize-png).
  • The user wants pixel-perfect originals on the web (rare, e.g. art prints) → use optimize-png/optimize-jpeg only, no resize.
  • Single-file conversion → call the underlying skill directly.

Inputs

  1. Input directory — required.
  2. Profile — preset bundle. One of:
    • blog (default): max-side 2000px, AVIF q60 + WebP q80 + JPEG q82 fallback, EXIF stripped.
    • gallery: max-side 3000px, AVIF q70 + WebP q85, EXIF stripped.
    • thumbnail: max-side 800px, AVIF q55 + WebP q75, EXIF stripped.
    • archival-web: max-side 4000px, AVIF q80 + WebP q90, EXIF preserved.
  3. Custom overrides — any of --max-side N, --avif-q N, --webp-q N, --jpeg-q N, --keep-exif, --no-jpeg-fallback.
  4. Output dir — default: <input>/web/. Inside: web/avif/, web/webp/, web/jpg/ parallel trees so the user can pick which set to upload.
  5. Recursive — --recursive. Mirrors subdirectory layout.

Procedure

  1. Pre-flight: verify install-deps shows green for: magick/convert, exiftool, vipsthumbnail, avifenc, cwebp (already present for existing convert-to-webp), cjpeg-mozjpeg or cjpeg (for JPEG fallback), oxipng, jpegoptim. Missing optional tools are skipped (and the corresponding output format is dropped from the pipeline with a one-line note).
  2. Stage 1: Decode/normalise inputs. Walk the input tree; classify each file:
    • JPEG/PNG/WebP/TIFF → pass through.
    • HEIC → decode to PNG via heif-convert (or via vipsthumbnail if libvips has libheif). Fail loud if neither is available.
    • RAW (CR2, ARW, NEF, DNG, ORF, RAF) → decode via darktable-cli "<input>" "<staged>.tiff" if installed, else vips copy (libvips has rudimentary RAW). If neither path works, skip the file with a flagged warning.
    • Anything else (BMP, GIF, etc.) → pass through.
  3. Stage 2: Strip EXIF. Unless --keep-exif set:

    exiftool -all= -tagsfromfile @ -Orientation -ColorSpace -overwrite_original "<staged>"

    Preserve Orientation and ColorSpace (rotation handling and colour fidelity) even in strip mode.

  4. Stage 3: Resize. Per file, fit within <max-side> box preserving aspect:

    vipsthumbnail "<staged>" --size "<max-side>x<max-side>" --output "<resized>.png[Q=100]"

    Use lossless intermediate to avoid double-compression. Skip if the source's longest side is already ≤ max-side.

  5. Stage 4: Encode. For each survivor, produce up to three outputs:

    • AVIF: avifenc -q <avif-q> -s 6 "<resized>.png" "<out>/avif/<basename>.avif"
    • WebP: cwebp -q <webp-q> "<resized>.png" -o "<out>/webp/<basename>.webp"
    • JPEG fallback (unless --no-jpeg-fallback): cjpeg-mozjpeg -quality <jpeg-q> -progressive -optimize (or stock cjpeg if mozjpeg missing) → <out>/jpg/<basename>.jpg

    Run encodes in parallel — they're independent.

  6. Stage 5: Optimise (final squeeze).
    • JPEGs: jpegoptim --strip-all --all-progressive in-place on web/jpg/.
    • PNGs (only if any survived as PNG, e.g. with --no-jpeg-fallback): oxipng -o 4 --strip safe.
    • AVIF / WebP: avifenc and cwebp already produce near-optimal output; no second pass.
  7. Cleanup: delete <staged> intermediates. Write a manifest at <output>/manifest.json mapping <original-path> → {avif, webp, jpg} plus per-file size deltas.

Output

  • Three parallel trees under <output-dir>: avif/, webp/, jpg/.
  • manifest.json with the mapping and size table.
  • Summary report:
    • Files processed / skipped / failed (with reasons).
    • Total bytes per format. Typical: <orig> → AVIF <X>%, WebP <Y>%, JPEG <Z>%.
    • Recommendation line: which format to upload (AVIF if all targets support it; WebP otherwise; JPEG as universal fallback).

Notes

  • Defaults are tuned for the blog profile. gallery and archival-web raise quality for slower-but-better output.
  • The orchestrator never modifies originals. The output tree is fully separate.
  • For very large input trees (>10k files), the stage-by-stage design is intentional — early failure of one stage doesn't waste the others' work; intermediates persist until cleanup.
  • Companion skill: convert-to-webp (single-format), convert-to-avif (single-format), optimize-png, optimize-jpeg. This orchestrator composes them; the user is welcome to use the components directly when they want finer control.

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.