← ClaudeAtlas

expo-docs-webplisted

Convert PNG screenshots referenced in local Expo docs `.mdx` pages to lossy WebP, rewrite their `src` references, and trash the original PNGs. PNG-only. MUST USE when the user points at a docs section, directory, glob, or `.mdx` file under `expo/docs/pages/` and asks to "convert images to webp", "optimize docs images", "png to webp", "shrink/compress docs screenshots", "make docs images lighter", or runs "/expo-docs-webp".
amandeepmittal/expo-docs-skills · ★ 1 · Web & Frontend · score 65
Install: claude install-skill amandeepmittal/expo-docs-skills
# Expo Docs WebP Convert the PNG screenshots on a set of Expo docs pages to lossy WebP, rewrite the references, and remove the originals. q80 cuts a typical screenshot by ~70% with no visible difference and passes Lighthouse's "next-gen formats" audit. Expo docs ship the committed file as-is (plain `<img>`, static export), so converting the file and rewriting the reference is the whole job. The work splits in two: a bundled script does the deterministic encoding (it only writes `.webp` files, never edits `.mdx`, never deletes); you do everything that touches source (rewrite refs, trash PNGs), because those need verification. ## When NOT to use - Scope is outside `expo/docs/pages/`. This skill only understands docs pages and `/static/images/` assets. - Images are JPG (re-encoding already-lossy stacks a second pass) or SVG (keep it vector). PNG-only by design. - `cwebp` isn't installed — tell the user `brew install webp` and stop. ## Requirements `cwebp` (`brew install webp`), `bun`, and `trash` (`brew install trash` — never `rm`). ## Workflow ### 1. Convert ```sh bun <skill-dir>/scripts/convert.ts <scope> ``` `<scope>` is any `.mdx` file, directory, or section path inside a docs checkout (e.g. one ending in `pages/eas`); the script finds the docs root itself. It prints one prefixed line per image: - `CONVERTED <ref> <pngKB> <webpKB> <saved%>` — `.webp` written next to the PNG. **Rewrite these refs.** - `EXISTS <ref>` — already converted on a prior run. Rewrite if th