screenshot について
screenshotは、Windows、macOS、Linuxの一般的な場所から最近のスクリーンショットを探して表示するスキルです。対応画像を更新日時順に並べ、表示件数を指定できます。
主な機能
- 01一般的な保存先の検出
- 02更新日時順の画像表示
- 03PNG・JPG・GIF・WebP対応
- 04表示件数の指定
- 05カスタムディレクトリの指定
活用シーン
- 01最新のスクリーンショット確認
- 02撮影した画面の検査
- 03指定フォルダー内の画像検索
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ 0xdarkmatter/ claude-mods --skill screenshotインストール後、Claude Code で/screenshotを入力して読み込まれたか確認します。
同梱ファイル
SKILL.md と一緒にインストールされる参考資料やスクリプト。
assets/.gitkeepreferences/.gitkeepscripts/.gitkeep詳細
スクリーンショットビューアー
一般的なスクリーンショット保存先から、最近のスクリーンショットをすばやく見つけて表示します。
使い方
/screenshot # Show last 5 screenshots (default)
/screenshot 1 # Show only the most recent
/screenshot 10 # Show last 10 screenshots
仕組み
-
スクリーンショットの保存先を自動検出 - 次の一般的なディレクトリをこの順番で確認します:
- Windows:
Pictures\Screenshots、ShareX、Greenshot、OneDrive\Screenshots - macOS:
~/Desktop、~/Screenshots - Linux:
~/Pictures、~/Desktop
- Windows:
-
最近のスクリーンショットを検索 - Glob で画像ファイル(png、jpg、jpeg、gif、webp)を検索し、更新日時順に並べます
-
画像を表示 - Read ツールでスクリーンショットを表示し、分析や内容についての会話ができるようにします
実装
ステップ 1:スクリーンショットの保存先を検出
一般的な場所を確認し、最初に見つかった場所を使用します:
Windows:
# Priority order
1. %USERPROFILE%\Pictures\Screenshots # Windows 11 native
2. %USERPROFILE%\Documents\ShareX\Screenshots # ShareX
3. %USERPROFILE%\Pictures\Greenshot # Greenshot
4. %USERPROFILE%\OneDrive\Pictures\Screenshots # OneDrive sync
5. %USERPROFILE%\Pictures # Fallback
macOS:
1. ~/Desktop # Default macOS location
2. ~/Screenshots # Custom folder
3. ~/Pictures # Fallback
Linux:
1. ~/Pictures/Screenshots # GNOME/KDE
2. ~/Pictures # Fallback
3. ~/Desktop # Alternative
ステップ 2:最近のスクリーンショットを検索
Glob を使って、更新日時順に画像ファイルを検索します:
# Find all image files in screenshot directory
fd -e png -e jpg -e jpeg -e gif -e webp . "$SCREENSHOT_DIR" --max-depth 1 -t f --exec stat --format="%Y %n" {} \; | sort -rn | head -n $COUNT
または、ネイティブツールを使用します:
Windows(PowerShell):
Get-ChildItem "$env:USERPROFILE\Pictures\Screenshots" -File |
Where-Object {$_.Extension -match '\.(png|jpg|jpeg|gif|webp)$'} |
Sort-Object LastWriteTime -Descending |
Select-Object -First $COUNT
Unix(Bash):
find "$SCREENSHOT_DIR" -maxdepth 1 -type f \( -iname "*.png" -o -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.gif" -o -iname "*.webp" \) -printf '%T@ %p\n' | sort -rn | head -n $COUNT | cut -d' ' -f2-
ステップ 3:スクリーンショットを表示
見つかった各スクリーンショットを Read ツールで視覚的に表示します:
Found 3 screenshots in C:\Users\...\Pictures\Screenshots
1. Screenshot_2026-01-28_14-32-10.png (45 KB, 2 minutes ago)
[Read tool displays image visually]
2. Screenshot_2026-01-28_14-15-03.png (128 KB, 19 minutes ago)
[Read tool displays image visually]
3. Screenshot_2026-01-28_13-58-22.png (67 KB, 36 minutes ago)
[Read tool displays image visually]
引数
| 引数 | デフォルト | 説明 |
|---|---|---|
count | 5 | 表示するスクリーンショットの数 |
例:
/screenshot- 直近の 5 件を表示/screenshot 1- 最も新しいものだけを表示/screenshot 10- 直近の 10 件を表示
出力形式
Screenshots from [directory]
## Screenshot 1 of N
**File**: [filename]
**Size**: [size] KB
**Modified**: [time ago]
[Visual display of screenshot via Read tool]
## Screenshot 2 of N
...
エッジケース
スクリーンショットの保存先が見つからない場合
No screenshot directory found.
Checked locations:
- C:\Users\...\Pictures\Screenshots (not found)
- C:\Users\...\Documents\ShareX\Screenshots (not found)
- C:\Users\...\Pictures\Greenshot (not found)
To use this skill, either:
1. Take a screenshot (Win+Shift+S on Windows)
2. Specify a custom directory: /screenshot --dir="C:\path\to\screenshots"
スクリーンショットが見つからない場合
No screenshots found in C:\Users\...\Pictures\Screenshots
Directory exists but contains no image files (.png, .jpg, .jpeg, .gif, .webp)
指定数が利用可能な数を超える場合
Found 3 screenshots (requested 10)
Showing all 3:
[displays all available screenshots]
パフォーマンス
- 高速 - すべてのファイルを読み込む代わりに、ファイルシステムツール(fd またはネイティブツール)を使用します
- 効率的 - 指定された数だけを読み込みます
- トークンを節約 - 大きなスクリーンショットは Read ツールによって自動的にサイズ変更されます
カスタムディレクトリ(任意)
標準以外のディレクトリを使用するには:
/screenshot 5 --dir="C:\Custom\Path"
または、.claude/screenshot.json にプロジェクト固有の設定を作成します:
{
"directory": "C:\\Custom\\Screenshots",
"default_count": 3,
"file_extensions": ["png", "jpg", "webp"]
}
統合
次のツールと相性よく動作します:
/explain- スクリーンショットの内容を説明/review- スクリーンショット内の UI/コードをレビュー- ブラウザー自動化ツール - スクリーンショットが期待される状態と一致するかを確認
注意事項
- 更新日時を基準にします(新しいものが先)
- サブディレクトリは無視します(トップレベルのみ)
- 一般的な画像形式(png、jpg、jpeg、gif、webp)に対応しています
- プラットフォーム固有のパスを使用し、Windows、macOS、Linux で動作します
コメント
Markdown 対応