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+.
0 upvotes
Log in to upvote or save- Made by
- Karan Bansal
- Pinned commit
-
10617a90106144d3cb131bd599e677d9c38bfd35 - 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
Made this mod? Add a badge to your README
Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.
[](https://modsforclaude.com/mods/image-peek/)