paste-preview

Reviewed at commit 255142d

See and mark up the images you paste into Claude Code: thumbnails above the prompt and in the transcript, and an editor that opens on paste

Made by
alan890104
What we checked

Shows thumbnails of images you paste above the prompt and opens a drawing editor on every paste. The edited picture replaces the original in your message and Claude is told where to read it. It reads Claude Code's cached copy of the paste (or the clipboard), keeps edits in a temp folder for a week, and sends nothing over the network.

Review details

Static review of the source at the pinned commit; not run. Hooks: session.start (polls the draft every 500 ms), prompt.edit, prompt.submit (for edited pastes it adds a context line naming the edited file), session.append for the prompt door (removes the original image block of an edited paste from your message), and ui.render for AbovePrompt and UserMessage. Runtime calls: $.prompt.read, $.fs read, write, stat, list, $.process.run for sips, pngpaste, wl-paste, xclip, PowerShell clipboard and language lookups, find or PowerShell to delete its own edit folders older than a week, mkdir, id, uname, and $.process.spawn for the editor. On macOS it compiles the bundled editor/panel.swift with xcrun swiftc on first use and keeps that panel running hidden for the session; it is a WebKit window that loads only the bundled editor.html and reads and writes only the picture and output paths it is given. Otherwise (Linux, Windows, Mac without Swift) it runs editor/server.mjs under node, which serves editor.html on 127.0.0.1 with a random token, opens it in a Chrome, Edge or default browser app window, and accepts the edited PNG by POST; there is no external network access, the page has no external scripts or requests, and the server exits after save, cancel or 30 minutes. Edits and thumbnails go to /private/tmp/paste-preview (macOS, not restricted to the user), /tmp/paste-preview-<uid> (0700) or %TEMP%\paste-preview, as disclosed in the README. Node, Swift, browsers and the clipboard tools were not reviewed. The editor files, which the bundle lists only as referenced paths, were read in the clone.

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 paste-preview

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/paste-preview.svg)](https://modsforclaude.com/mods/paste-preview/)

← All mods