From image-production
Use when the user wants to shrink JPEG files — losslessly with `jpegoptim` (~5–15% reduction, no re-encode) or with re-compression via `mozjpeg` (~10–15% better than libjpeg-turbo at the same visual quality). Web-prep workhorse for photo libraries.
npx claudepluginhub danielrosehill/claude-code-plugins --plugin image-productionThis skill uses the workspace's default tool permissions.
Squeeze JPEG file size. Two modes:
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Share bugs, ideas, or general feedback.
Squeeze JPEG file size. Two modes:
jpegoptim --strip-all. Repacks Huffman tables and strips metadata. No re-encode, no quality change.mozjpeg (cjpeg-mozjpeg). Re-encodes with better quantisation tables; 10–15% smaller than libjpeg-turbo for the same SSIM. Quality flag controls trade-off.web-ready orchestrator.Do not use this skill when:
optimize-png.web-ready (or convert first).lossless (default) or recompress.--recursive for directory descent.--output-dir <path> to write copies.cjpeg-mozjpeg -quality N. Default 82 (web-quality). 90 for archival; 75 for aggressive web compression.on for both modes. EXIF/IPTC/XMP gone. Use --keep-metadata to preserve.on. Smaller files + better perceived load. --baseline to disable for compatibility with very old decoders.Verify the relevant binary. which jpegoptim for lossless; which cjpeg-mozjpeg (or fallback which cjpeg) for recompress. If missing, point at install-deps.
Enumerate inputs (JPEG/JPG only — skip with note).
Lossless (jpegoptim):
jpegoptim --strip-all --all-progressive [--dest <out-dir>] "<input>"
--all-progressive forces progressive output (smaller). --strip-all removes EXIF/IPTC/XMP/comments. Drop these if --keep-metadata was set.
Recompress (mozjpeg):
mozjpeg's CLI is decode-then-encode, so for in-place behaviour:
djpeg "<input>" | cjpeg-mozjpeg -quality <q> -progressive [-optimize] > "<output>"
Or use jpegtran-mozjpeg for lossless transforms when only metadata stripping + Huffman repack is desired (essentially a faster jpegoptim).
For batch, parallelise with xargs -P <ncpu>.
Sanity-check: any output file >95% of input size in recompress mode — keep the original instead. cjpeg-mozjpeg occasionally inflates already-optimised inputs.
<orig-MB> → <new-MB> (<pct>% saved).identify -format "%Q"), surface a warning per file.lossless mode. Free win.web-ready) defaults to: resize first, then encode WebP/AVIF, fall back to mozjpeg for JPEG output. This skill exists to do JPEG-only optimisation without that pipeline.