From simulator-screenshot-crop
Automatically crops iOS/Android simulator screenshots by detecting and removing macOS window title bar via alpha channel. Handles 1x/2x/3x resolutions for clean Xcode captures or App Store prep.
npx claudepluginhub sean-sunagaku/claude-code-plugin --plugin simulator-screenshot-cropThis skill uses the workspace's default tool permissions.
シミュレーターのスクリーンショットから macOS ウィンドウのタイトルバーを自動除去する。
Provides iOS Simulator bash commands for screenshots with auto-resize to meet API limits, device management, app operations, video recording, and xcodebuild workflows. Use for iOS simulator testing.
Resizes and validates App Store screenshots to exact dimensions for iPhone, iPad, Watch, Mac, TV using macOS sips. Fixes filenames, alpha channels for App Store Connect submission.
Generates App Store/Google Play promotional screenshots in Pencil (.pen) format using 5-agent team for strategy, Pencil design, copywriting, spec validation, and quality review. Use for app promo images.
Share bugs, ideas, or general feedback.
シミュレーターのスクリーンショットから macOS ウィンドウのタイトルバーを自動除去する。
シミュレーターのスクショは alpha チャンネル付き PNG。タイトルバー部分は不透明で、 デバイスベゼルとの境界から透明になる。画像中央列を走査して最初の alpha=0 ピクセルを 見つけることでバーの高さを自動特定する。
Python 3 + Pillow が必要。なければ pip install Pillow でインストール。
# 基本: 同じディレクトリに _cropped サフィックスで保存
python scripts/crop_chrome.py ~/Desktop/Screenshot1.png ~/Desktop/Screenshot2.png
# 複数ファイル一括
python scripts/crop_chrome.py ~/Desktop/*.png
# 出力先ディレクトリを指定
python scripts/crop_chrome.py ~/Desktop/*.png -o ~/Desktop/cropped/
# サフィックスをカスタマイズ
python scripts/crop_chrome.py ~/Desktop/*.png -s _clean
# 元ファイルを上書き
python scripts/crop_chrome.py ~/Desktop/*.png --overwrite
| フラグ | 説明 | デフォルト |
|---|---|---|
-o, --output-dir | 出力先ディレクトリ | 元ファイルと同じ場所 |
-s, --suffix | 出力ファイル名のサフィックス | _cropped |
--overwrite | サフィックスなしで上書き | off |
alpha チャンネル方式で自動検出するため、解像度に依存しない:
| 解像度 | 画像幅の目安 | chrome bar の高さ |
|---|---|---|
| 1x | ~434px | ~52px |
| 2x | ~868px | ~104px |
| 3x | ~1302px | ~156px |