agentleFS
casooncasoon/ai-agent-config/skills/image-to-webp/SKILL.md

image-to-webp

Skill1 starsChanged 47 days agoMITView on GitHub

Use when converting PNG/JPG images to WebP for web deployment — covers dimension limits by use-case, quality settings, batch conversion, reference updates in Astro files, and cleanup of originals.

The file

Files
SKILL.md

Image → WebP Conversion

Dimension presets

Use caseMax widthNotes
Content / beside-text1200pxStandard für Seiten-Bilder
Team / Portrait800pxQuadratische Darstellung, 800 reicht
Hero / full-bleed1920pxNur wenn wirklich vollflächig
Wide content1600pxGruppenfotos, Panoramas

Quality

  • 85 — Standard für Fotos (gutes Verhältnis, keine sichtbaren Artefakte)
  • 90 — Wenn Kunde auf Schärfe besteht
  • 75 — Logos/Grafiken mit Flächen (artefakte weniger sichtbar)

Workflow

  1. Dimensionen der Quell-Bilder prüfen: python3 -c "from PIL import Image; ..."
  2. Konvertieren mit scripts/convert.py
  3. Referenzen in .astro-Dateien aktualisieren (grep → sed)
  4. Original-PNGs löschen

Gotchas

  • Pillow muss installiert sein: pip3 install Pillow — auf macOS meist vorhanden
  • method=6 in Pillow = langsamste aber beste WebP-Kompression — vertretbar für einmalige Konvertierung
  • PNG mit Transparenz (RGBA): erst in RGB konvertieren, sonst WebP-Fehler: img.convert('RGB').save(...)
  • Nach dem Löschen der PNGs: git-tracked PNGs brauchen git rm, untracked einfach rm

Script

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.