From nano-banana-pro
Optimize image size for GitHub, Slack, web, or custom constraints
How this command is triggered — by the user, by Claude, or both
Slash command
/nano-banana-pro:optimize-imageThe summary Claude sees in its command listing — used to decide when to auto-load this command
# Optimize Image Command Reduce image file size for GitHub, Slack, web, or other constrained environments. ## Prerequisites - Python 3.10+ installed - `uv` package manager installed - macOS uses built-in `sips` (no extra dependencies) - Other platforms use Pillow (installed automatically) ## Presets | Preset | Max Size | Max Width | Use Case | |--------|----------|-----------|----------| | `github` | 500KB | 1280px | README images, PR screenshots | | `slack` | 128KB | 800px | Slack/Discord messages | | `web` | 200KB | 1200px | Blog posts, documentation | | `thumbnail` | 50KB | 400px | ...
Reduce image file size for GitHub, Slack, web, or other constrained environments.
uv package manager installedsips (no extra dependencies)| Preset | Max Size | Max Width | Use Case |
|---|---|---|---|
github | 500KB | 1280px | README images, PR screenshots |
slack | 128KB | 800px | Slack/Discord messages |
web | 200KB | 1200px | Blog posts, documentation |
thumbnail | 50KB | 400px | Previews, icons |
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python "${CLAUDE_PLUGIN_ROOT}/skills/generate/scripts/optimize.py" \
<image-path> \
[--preset github|slack|web|thumbnail] \
[--max-size 500KB] \
[--width 800] \
[--out "./optimized.png"]
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python "${CLAUDE_PLUGIN_ROOT}/skills/generate/scripts/optimize.py" \
./banner.png --preset github
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python "${CLAUDE_PLUGIN_ROOT}/skills/generate/scripts/optimize.py" \
./screenshot.png --preset slack
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python "${CLAUDE_PLUGIN_ROOT}/skills/generate/scripts/optimize.py" \
./image.png --max-size 300KB --width 1000
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python "${CLAUDE_PLUGIN_ROOT}/skills/generate/scripts/optimize.py" \
./large-image.png --preset web --out ./web-ready.png
The command prints the optimized file path and size reduction:
Optimized: ./banner-optimized.png
Size: 2340KB → 420KB (82% reduction)
sips on macOS (built-in) or Pillow on other platformsnpx claudepluginhub fakoli/fakoli-plugins --plugin nano-banana-pro/image-processingResize, convert, trim, or optimise images for web. Provide operation (resize|convert|trim|optimise) and image path or description.
/gemini-imageGenerates images from text descriptions using Google Gemini AI. Interactively selects model (e.g., gemini-3.1-flash-image-preview) and aspect ratio (e.g., 1:1). Requires GEMINI_API_KEY and Python 3.
/sanitizer-statusChecks image sanitizer status: reports env vars for dimensions/size/quality, ImageMagick/jq availability/versions, Anthropic limits, and troubleshooting tips.
/generate-variantInteractively generates Cloudflare Images variants: prompts for name, dimensions, fit mode, quality; creates via API call and optionally adds config to wrangler.jsonc.