Hook

Post-Edit Image Optimize

Auto-optimize images when written to the repo.

安裝

manual
add to ~/.claude/settings.json hooks.PostToolUse

把這段加入 Claude Code MCP 設定,或直接透過 CLI 執行。

介紹

PostToolUse hook detecting image writes (PNG/JPG) and running optimization (mozjpeg / oxipng) to keep repo size in check.

常見使用情境

  • Keep repo size lean
  • Auto-compress screenshots
  • Image pipeline

標籤

assetsoptimizationautomation