ClaudeMods
☰
KO
● 0 명 접속 중 · 조회 0 회
후원프로젝트 제출
GitHub 저장소 · 작성자 鹿野 壮 Takeshi Kano

image-view

붙여넣은 이미지를 단순한 `[Image #n]` 태그 대신 프롬프트 위에 썸네일로 미리 보여 주는 Claude Code 모드입니다.

鹿野 壮 Takeshi Kano@tonkotsuboy_com

1/

ペーストした画像をプレビューできるようになるClaude Code mod、便利すぎでしょ…🚃 標準機能に入れてほしい https://github.com/jarrodwatts/claude-image-view

원본 게시물 이미지1
번역 완료

이 mod 소개

Claude Image View는 Claude Code 모드로, 붙여넣은 이미지의 썸네일을 프롬프트 위 영역에 렌더링해 단순한 [Image #n] 태그를 대신합니다. 프롬프트 상자에서 [Image #n] 태그를 200ms마다 폴링하고, 세션에 캐시된 PNG 파일을 찾아 PNG 헤더에서 크기를 읽은 다음 Claude Code의 Image 요소로 그립니다. 따라서 이미지 데이터는 이 모드를 통과하지 않습니다. 썸네일은 붙여넣는 즉시 나타나고 가로세로 비율을 유지하며 사용 가능한 공간에 맞춰지고 전송할 때 지워집니다. 로컬에서만 동작하고 네트워크 요청이나 파일 쓰기를 하지 않으며, Claude Code v2.1.287+, macOS 또는 Linux, Ghostty나 kitty처럼 kitty 그래픽 프로토콜을 지원하는 터미널이 필요합니다. /plugin marketplace add jarrodwatts/claude-image-view를 사용한 뒤 /plugin install image-view와 /reload-plugins를 실행해 설치합니다.

설치

먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.

claude plugin marketplace add jarrodwatts/claude-image-view
claude plugin install image-view
원문 / README

Claude Image View

A Claude Code mod that shows the images you paste, so you see thumbnails above your prompt instead of bare [Image #1] tags.

License Stars

Claude Image View in action

Install

Inside Claude Code, run:

/plugin marketplace add jarrodwatts/claude-image-view
/plugin install image-view
/reload-plugins

That's it. Paste an image into the prompt and its thumbnail appears above the input.

<details> <summary><strong>Prefer the terminal?</strong></summary>
claude plugin marketplace add jarrodwatts/claude-image-view
claude plugin install image-view@claude-image-view

Then run /reload-plugins inside a session, or start a new one.

</details>

What You See

Paste one or more images and a row of thumbnails sits above the prompt, each labelled with the number of its tag:

╭────────────────────────╮ ╭────────────╮
│                        │ │            │
│      (screenshot)      │ │  (photo)   │
│                        │ │            │
│           #1           │ │     #2     │
╰────────────────────────╯ ╰────────────╯
❯ why is the header misaligned here [Image #1] vs [Image #2]
  • Thumbnails appear as soon as you paste. You don't have to type another key first.
  • Thumbnails keep their shape. Wide screenshots stay wide and phone shots stay tall.
  • Always fits on screen. Tiles shrink to fit the space above the prompt, so the row never scrolls or gets cut off.
  • Clears on send. Once the prompt is sent (or the tags are deleted), the row goes away.

How It Works

Claude Code saves every pasted image to a cache folder for the session, as <tmp>/<project>/<session>/images/<n>.png, and puts an [Image #n] tag in the prompt. Claude Image View is a mod:

  1. Every 200ms it reads the prompt box and looks for [Image #n] tags. It checks on a timer because pasting an image doesn't raise an edit event.
  2. For each tag it finds the cached PNG and reads its size from the PNG header.
  3. It draws the thumbnails in the band above the prompt with Claude Code's Image element. The terminal reads the file itself, so the image data never passes through the mod.

Security

Claude Image View is local-only. It makes no network requests and writes no files. It reads the prompt box, lists Claude Code's temp folder to find the current session's image cache, and reads the first bytes of each pasted image. If CLAUDE_CODE_TMPDIR isn't set, it runs id -u once to find the default temp folder.

Run claude plugin validate on the repo to see every event it hooks and every call it makes.

Requirements

  • Claude Code v2.1.287 or later (mods support)
  • macOS or Linux
  • A terminal with the kitty graphics protocol, such as Ghostty or kitty

Other terminals show [Image #n] in each tile instead of the picture. The Claude Desktop app already previews pasted images, so the mod draws nothing there.

Troubleshooting

Nothing appears when I paste. Run /plugin and check the dim line under the tabs lists image-view as an active mod. If it isn't listed, run /reload-plugins.

The tile says "no preview". The mod couldn't find the cached file. Claude Code may have moved where it stores pasted images. Please open an issue with your Claude Code version.

The tile shows [Image #1] text instead of the picture. Your terminal doesn't support the kitty graphics protocol. See Requirements.

The tile shows [Image #1] text in agent view or a background session, even in Ghostty or kitty. Claude Code turns terminal images off for background sessions. If you attach from a terminal with the kitty graphics protocol, turn them back on in the env block of ~/.claude/settings.json, then start a new session:

"env": { "CLAUDE_CODE_FORCE_TERMINAL_IMAGES": "1" }

Development

git clone https://github.com/jarrodwatts/claude-image-view
cd claude-image-view

# Load it for one session without installing
claude --plugin-dir .

# Check it and run the tests
claude plugin validate .
claude plugin test .

Claude Code writes the API types into .claude-plugin/types/ the first time it loads the mod, and tsc -p . type-checks it from then on.

License

MIT. See LICENSE.

Star History

Star History Chart

Showcase: ペーストした画像をプレビューできるようになるClaude Code mod、便利すぎでしょ…🚃 標準機能に入れてほしい

https://github.com/jarrodwatts/claude-image-view 貼上圖片後可在 Claude Code 裡預覽

비슷한 프로젝트