Preflight Checklist
Problem Statement
Summary
Images cannot be pasted directly into the Claude Code CLI prompt. Users must manually save screenshots/images to disk and pass the file path, which breaks the flow when doing visual debugging or sharing UI screenshots.
Current behavior
Pasting an image from clipboard in the CLI has no effect — only text is accepted.
Expected behavior
When a user pastes an image (e.g. a screenshot), Claude Code detects the clipboard image, auto-saves it to a temp file, and attaches the path to the prompt — same result as if the user had typed the path manually.
Proposed Implementation
Detect image data in clipboard on paste → save to /tmp/claude-img-<timestamp>.png → append path to current prompt input. This avoids terminal rendering complexity (no need for Kitty/Sixel/iTerm2 inline image protocols) while covering the majority of real use cases.
Platform notes
- macOS:
pngpaste or osascript can read clipboard image data
- Linux X11:
xclip -selection clipboard -t image/png
- Linux Wayland:
wl-paste --type image/png
- Windows: PowerShell
Get-Clipboard -Format Image
Preflight Checklist
Problem Statement
Summary
Images cannot be pasted directly into the Claude Code CLI prompt. Users must manually save screenshots/images to disk and pass the file path, which breaks the flow when doing visual debugging or sharing UI screenshots.
Current behavior
Pasting an image from clipboard in the CLI has no effect — only text is accepted.
Expected behavior
When a user pastes an image (e.g. a screenshot), Claude Code detects the clipboard image, auto-saves it to a temp file, and attaches the path to the prompt — same result as if the user had typed the path manually.
Proposed Implementation
Detect image data in clipboard on paste → save to
/tmp/claude-img-<timestamp>.png→ append path to current prompt input. This avoids terminal rendering complexity (no need for Kitty/Sixel/iTerm2 inline image protocols) while covering the majority of real use cases.Platform notes
pngpasteorosascriptcan read clipboard image dataxclip -selection clipboard -t image/pngwl-paste --type image/pngGet-Clipboard -Format Image