file-view
Reviewed
at commit dd91f77
Caution: Runs bun scripts that import npm packages not declared in the plugin folder, so bun may fetch unpinned latest versions from npm the first time you view an image or Markdown file.
Click a file path under a Read, Edit or Write row to show that file's contents in a pane beside the transcript.
0 upvotes
Log in to upvote or save- Made by
- ushironoko
- Pinned commit
-
dd91f779a05269e26304051c743ff2e1e664a362 - What we checked
-
Adds a clickable path under Read, Edit and Write rows that opens the file in a side pane with syntax highlighting, rendered Markdown, or PNG, JPEG and SVG pictures. It also gives Claude an open_file tool that shows any file in that pane. Images and Markdown are rendered by bun scripts that write temp files.
Review details
Static review of the source at the pinned commit; not run. Registers session.start (registers the open_file tool via $.tool.register), tool.call for mcp__file-view__open_file, ui.render for ToolUse (adds the path button on terminal) and Pane, and ui.close. open_file takes any absolute or project-relative path, shows it in the pane and returns only 'Opened <path>' to Claude, so file contents are not sent to the model; it does not restrict the path, so Claude can put any readable file on your screen. Text files are read with $.fs.read (binary skipped), paged and shown with $.ui Code; the copy button uses $.ui.copy. PNG, JPEG, SVG and Markdown go through $.process.run of bun on scripts/render-image.ts and scripts/render-markdown.ts in the plugin folder, which use @resvg/resvg-js, @ox-content/napi and satoru-render (native and WASM npm packages, not reviewed). Those are pinned only in the author's dotfiles repository root (package.json and bun.lock), not in the plugin folder, so an installed copy relies on bun resolving them. The scripts write PNG tiles to the OS temp folder claude-file-view and delete entries there older than 24 hours, cache fonts in ~/.cache/claude-file-view/fonts, run `rex block call size` only when REX_BLOCK is set, and the Markdown renderer lets the page load file:// images and fonts or CSS from fonts.googleapis.com, fonts.gstatic.com and cdn.jsdelivr.net (no user data is sent; the request is made only if the Markdown names them). Needs bun installed. No fetch calls in the plugin code, eval or encoded code.
- What it uses
-
- Reads your prompts: no
- Sees tool calls: yes
- 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
Click a file path under a Read, Edit or Write row to show that file's contents in a pane beside the transcript, or let the model open one with the open_file tool.
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/file-view/)