Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Claude Screenshot Helper

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.

Features

  • 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/path references when possible
  • Fall back to an absolute path if a relative path cannot be computed
  • Optional desktop notification after capture

Requirements

  • Linux desktop session
  • gnome-screenshot
  • xclip
  • realpath

On Debian or Ubuntu:

sudo apt install gnome-screenshot xclip coreutils

Installation

git clone <your-repo-url>
cd screenshot-claude
chmod +x ./claude-shot.sh

Usage

Run the script:

./claude-shot.sh

By 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.

Options

./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-only copies only the absolute image path
  • --at-ref copies only the Claude file reference, such as @relative/path/to/image.png
  • --prompt copies the full prompt, such as Analyze this image: @relative/path/to/image.png
  • output_dir changes the directory where screenshots are stored

How Paths Work

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.

Notes

  • 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-send is optional; if available, the script shows a desktop notification after saving the screenshot

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Bash screenshot helper that copies Claude-ready image paths to the clipboard.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages