Claude Screenshot Helper is a small Bash utility for Linux that lets you select a screen region, save the image locally, and copy a Claude-ready reference to your clipboard.
It is designed for workflows where you want to capture part of the screen and immediately paste the result into Claude Code or Claude CLI.
- Capture a selected screen region with
gnome-screenshot - Save screenshots with timestamped filenames
- Copy a Claude-friendly prompt to the clipboard by default
- Generate
@relative/pathreferences when possible - Fall back to an absolute path if a relative path cannot be computed
- Optional desktop notification after capture
- Linux desktop session
gnome-screenshotxcliprealpath
On Debian or Ubuntu:
sudo apt install gnome-screenshot xclip coreutilsgit clone <your-repo-url>
cd screenshot-claude
chmod +x ./claude-shot.shRun the script:
./claude-shot.shBy default, the script:
- opens an area-selection screenshot tool
- saves the image to
~/Pictures/ClaudeShots - copies a prompt like
Analyze this image: @../../../Pictures/ClaudeShots/claude-shot_2026-04-27_12-00-00.png
You can then paste the clipboard content directly into Claude.
./claude-shot.sh --path-only
./claude-shot.sh --at-ref
./claude-shot.sh --prompt
./claude-shot.sh /custom/output/dir
./claude-shot.sh --at-ref /custom/output/dir--path-onlycopies only the absolute image path--at-refcopies only the Claude file reference, such as@relative/path/to/image.png--promptcopies the full prompt, such asAnalyze this image: @relative/path/to/image.pngoutput_dirchanges the directory where screenshots are stored
The script always saves the screenshot using an absolute filesystem path.
For Claude-oriented clipboard modes, it then tries to convert that path into a path relative to the current working directory. This is useful because Claude CLI commonly handles @relative/path references more reliably in terminal workflows.
If a relative path cannot be computed, the script falls back to the absolute path.
- Run the script as your regular desktop user, not with
sudo - On Wayland, automatic text injection into another app is restricted, so clipboard-based handoff is the reliable approach
notify-sendis optional; if available, the script shows a desktop notification after saving the screenshot
This project is licensed under the MIT License. See the LICENSE file for details.