image-peek

Reviewed at commit 10617a9

Preview pasted images at their prompt markers on macOS. Ghostty, plus experimental iTerm2 and Herdr support with a startup override. Claude Code 2.1.287+.

Made by
Karan Bansal
What we checked

On macOS in Ghostty, iTerm2 or Herdr, shows a preview of an image you pasted when the cursor is on its [Image #n] marker in the prompt. When a new marker appears it reads the image from your clipboard with the system osascript tool and keeps a copy in a temporary folder that it removes when the session ends. Nothing is sent over the network.

Review details

Static review of the source at the pinned commit; not run. Registers session.start, prompt.edit, prompt.fill, command.run (/image-peek on|off), session.end, session.compact and ui.render for AbovePrompt and Pane, plus a 120 ms $.clock.every poll that reads the prompt draft ($.prompt.read) to find [Image #n] markers. Environment reads: TERM_PROGRAM, GHOSTTY_RESOURCES_DIR, HERDR_ENV, CLAUDE_CODE_FORCE_TERMINAL_IMAGES. Runs only /usr/bin/uname and /usr/bin/osascript on its own hooks/clipboard.js, which validates a session id, reads the clipboard PNG or TIFF (size limited to 32 MB and 64 megapixels), re-encodes it as PNG, writes it with owner-only permissions to the temp folder claude-image-peek/<session>, keeps at most 24 files and deletes the folder on cleanup. Session state (marker ids, image paths, enabled flag) is kept with $.state. The clipboard may hold an image other than the pasted one, but it is only read locally. No network calls.

What it uses
  • Reads your prompts: yes
  • Sees tool calls: no
  • Blocks or changes tool calls: no
  • Reads or writes files: yes
  • Runs programs on your machine: yes
  • Calls the model (uses tokens): no
  • Sends data over the network: no
  • Stores data: yes
  • Shows something on screen: yes
Hooked events
Made this mod? Add a badge to your README

modsforClaude badge for image-peek

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/image-peek.svg)](https://modsforclaude.com/mods/image-peek/)

← All mods