ClaudeCodeMod

All shelves / Mods / Review

doc-preview

By radumarias

doc-preview is a Claude Code review mod by radumarias.

Draws a Preview band above the prompt when Claude writes a Markdown or Mermaid file or a mermaid block, and opens it in a side panel with the diagrams drawn.

Draws

Install

The marketplace name is xorio.

In Claude Code
/plugin marketplace add radumarias/xorio-claude-plugin
/plugin install doc-preview@xorio
Open the repo

It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.

Version
0.2.0
License
MIT
Repo stars
3
Last change
2026-10-20

What it can reach

  • Draws in the session
  • Reads this turn's file edits
  • Calls another program on this machine

Built and tested against Claude Code 2.1.291; the author says the function-hooks API is early access and may change between releases. The panel and band show in the terminal, the desktop app, and Claude Code for VS Code, not in the web app at claude.ai/code. Diagrams show as images in the desktop app, and in kitty or Ghostty with resvg, rsvg-convert, or mmdc installed; elsewhere mermaid-ascii draws them as text, and without it the diagram's source shows with a hint to press b. Run /reload-plugins after installing one of those tools. Paths with any other extension are refused, so a secrets file such as .env is never shown.

The marketplace, xorio, also holds the xorio plugin, whose /xorio:preview command this mod answers; without xorio, the mod registers plain /preview instead. Reading Claude's docs and diagrams is why this page files it under review. md-preview, by hamzafer, draws the before and after of a Markdown edit beside the session, rendered the way GitHub does. mdview, by xuanji86, opens a clicked Markdown path as a rendered pane. This one also takes plan-mode plans and mermaid blocks in replies, and draws Mermaid with pele, a renderer vendored in the mod. In the panel, w and n change its width, z goes full screen, f opens the file picker, and b writes a page to ~/.cache/claude-doc-preview/ and opens it in your browser, which loads marked, DOMPurify, and pele from jsDelivr. A shown file reloads by itself when Claude edits it.

Demo

The author's screenshot of doc-preview: Claude Code's conversation on the left, and the panel on the right drawing the sequence diagram from the reply, You, Claude Code, and doc-preview.
From the author's repo.

What it hooks into

  • session.startWhen a session starts
  • config.setA Claude Code event
  • command.runWhen you run its slash command
  • tool.callAround a tool call, where it can hold oneWriteEdit
  • session.appendWhen an entry is written to the transcript
  • ui.renderDraws into the sessionAbovePromptPane

Read from the on() calls in its hook modules. Open its source under Files to check what each one does.

Files

The author's README and source, 4 files. They load when you open them.

Facts

Author
radumarias
Category
Review
Marketplace
xorio
Repo
radumarias/xorio-claude-plugin
Folder
mods/doc-preview
Version
0.2.0
License
MIT
Repo stars
3
Last change
2026-10-20
Language
TypeScript
Files
25

Other mods in Review

cc-esolrapha-rodriguesCorrects the English you type or dictate into a local learning log, with an esol pane of your corrections and a Review of your recurring patterns.quiet-bashschreibseDraws each tool call as one line, with ✗ exit N on a failure and +N −M on edits, hides result blocks, and shows PNG thumbnails under rows that touch one.pr-review-boardekcmReviews several pull requests at once with Claude and Codex in a live panel, runs each PR's tests, and shows what both agree on and what they still dispute.desk-planKyongSik-YoonHolds a commandAsks for plan approval in a card above the prompt with the plan open in a side pane: 1 approves, typed changes send it back, 9 opens Claude Code's own dialog.desk-reviewKyongSik-YoonOpens the report of /desk-review:simplify-review, which runs /simplify then /code-review medium, in a side pane: each item with its file, line, and reason.grammarjaklimoffChecks the English of each prompt with Haiku and draws the fixes in red and green under it, with stats and a review of the mistakes you make most.flow-planmadmat01Holds a commandDraws Claude's Power Automate flow plan in a pane with licence badges and design checks, and blocks the build tools until you approve that flow's plan.review-radarpedrovelasquez9Reads the branch diff after each turn and draws a pane of only the changes a person must confirm, with diff lines and Reviewed and Request changes buttons.mod-file-treev-amorimDraws a Files panel of what Claude read and changed this session, lit live while it works, with +/- line counts and a replay of the last turn's diffs.mod-transcriptv-amorimRestyles the transcript as chat bubbles, folds each finished turn and each tool row to one line, colors code, and adds a copy button to replies.improve-promptwaltherhuggoDraws an Improve prompt button above the prompt box that rewrites your draft with the session's context; /improve does the same, and you review and send it.done-gatevumichienTells Claude and you, in a toast, when a task is marked done while changed code is untested, and draws the last test run in a band.
All 145 in Review