expo-docs-webplisted
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