image-compressor
Skill8 starsChanged 7 months agoMITView on GitHub
添付された複数の画像を一括で圧縮・リサイズするスキル。「画像を圧縮して」「このスクショを軽くして」「リサイズして」「画像を小さくして」などのリクエストで使用する。Pillowで長辺1920pxにリサイズし、JPEG/PNGで出力先ディレクトリに保存する。
- Reads credentials
- Installs packages
In this repository10 other files it gives its agents.
- claude-md-managerSkill
- codebase-onboardingSkill
- coding-rulesSkill
- design-md-generatorSkill
- flutter-riverpod-archSkill
- knowledge-graph-initSkill
- media-transcriberSkill
- meti-ai-guidelineSkill
- nano-banana-image-genSkill
- nextjs-better-auth-postgres-dockerSkill
The file
Files
画像圧縮・リサイズ
添付された画像を一括で圧縮・リサイズして出力先ディレクトリに保存するスキル。
実行手順
- ユーザーが添付した画像パスを収集する
- ユーザーの指示から出力フォーマット(
jpg/png)、長辺サイズ、品質などの指定を抽出する - 以下のコマンドを実行する
基本(元の拡張子を維持、長辺1920px):
python .claude/skills/image-compressor/scripts/compress_images.py "画像1" "画像2" "画像3"JPGで出力:
python .claude/skills/image-compressor/scripts/compress_images.py "画像1" "画像2" --format jpgPNGで出力、長辺1280px、品質90:
python .claude/skills/image-compressor/scripts/compress_images.py "画像1" --format png --max-size 1280 --quality 90- 出力パスと圧縮結果をユーザーに報告する
引数
| 引数 | 説明 | デフォルト |
images | 入力画像パス(可変長・必須) | — |
--format | 出力フォーマット(jpg / png) | 元の拡張子を維持 |
--max-size | 長辺の最大ピクセル数 | 1920 |
--quality | JPEG品質(1-100) | 85 |
設定
プロジェクトルートの .env に以下の環境変数を設定する(任意。未設定時はデフォルト値を使用):
IMAGE_COMPRESS_OUTPUT_PATH=images/compressed| 変数名 | 説明 |
IMAGE_COMPRESS_OUTPUT_PATH | 出力先ディレクトリ(デフォルト: images/compressed) |
出力
- ファイル名: 元ファイル名をそのまま使う(
photo.jpg→photo.jpg)。同名ファイルが既に存在する場合のみ_1,_2… と連番を付与 - 保存先: プロジェクトルートの
images/compressed/ - JPEG出力時、RGBA画像は白背景で合成してRGBに変換する
- 長辺が
--max-size未満の場合はリサイズせず圧縮のみ行う
依存パッケージ確認
初回エラー時は以下でインストール:
pip install pillow python-dotenvDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

