ClaudeCodeMod

All shelves / Mods / Review

md-preview

By hamzafer

md-preview is a Claude Code review mod by hamzafer.

When Claude edits Markdown, draws the before and after beside the session, rendered the way GitHub does.

Draws

Install

The marketplace name is claude-code-mods.

In your shell
claude plugin marketplace add hamzafer/claude-code-mods
claude plugin install md-preview@claude-code-mods
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.1.8
License
MIT
Repo stars
381
Last change
2026-10-23

What it can reach

  • Draws in the session
  • Reads this turn's file edits
  • Reaches the network or an outside service
  • Calls another program on this machine

Claude Code 2.1.287 or later. The author says to restart after installing. The rendered view needs Google Chrome or Chromium and a terminal that shows images, such as Ghostty, kitty, iTerm2, or WezTerm, and does not work through tmux. Without them you get a text view. The author built and tested it on macOS. When Claude edits a .md, .mdx, or .markdown file, shell writes included, a toast says so once per file per turn. /md opens a pane on the latest one, /md <path> on any file, and /md compare <a> <b> two files side by side. In the pane, b shows before and after, n and p move between files, o opens the page in your browser, t switches to text, and q closes. A green bar marks the blocks the last edit changed. It renders with GitHub's own renderer through gh api /markdown when the repo has a GitHub remote and gh is signed in, and with a small built-in renderer otherwise. The author says that with the GitHub renderer the file's text goes to GitHub's API under your own gh login, for every Markdown file Claude edits, at the end of the turn, even if you never open /md. Scripts in the Markdown never run. /mdview does the same as /md.

The marketplace, claude-code-mods, holds all of hamzafer's mods. This one installs on its own, or from the checklist that npx claude-code-mods@latest opens. Rendering the Markdown Claude changed is why this page files it under review. mdview, by xuanji86, opens a clicked Markdown path as a rendered pane beside the conversation and sends an edit you type in a block. cc-preview, by andrew54068, draws hover cards and image thumbnails, with a side pane that previews markdown. This one waits for Claude to edit a Markdown file, then shows the page before and after the edit, rendered the way GitHub does.

Demo

A Markdown diff beside the page rendered like GitHub
From the author's repo.

What it hooks into

  • session.startWhen a session starts
  • turn.startWhen Claude starts a turn
  • turn.completeWhen a turn ends
  • tool.callAround a tool call, where it can hold one
  • command.runWhen you run its slash command/md/mdview
  • ui.renderDraws into the sessionPane

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

Slash commands 2

  • /md
  • /mdview

Files

The author's source, 3 files. They load when you open them.

Facts

Author
hamzafer
Category
Review
Marketplace
claude-code-mods
Repo
hamzafer/claude-code-mods
Folder
mods/md-preview
Version
0.1.8
License
MIT
Repo stars
381
Last change
2026-10-23
Language
TypeScript
Files
8

Other mods in Review

files-touchedSingh-APDraws one line above the prompt for files Claude changed this session, with lines added and removed. /touched pane lists them, and a press inserts @path.change-ledgerarasovicDraws a pane of every file this session touched, with lines added and removed and which agent edited it, beside the git working tree.turn-timelinearasovicDraws the current turn as a timeline: one lane for the main loop, one per subagent, the split between model, tools, and idle, and the three slowest steps.show-mearasovicDraws each mermaid diagram in an answer as a picture in a pane once the turn ends. /show-me asks for an answer in diagrams.image-peekarasovicDraws thumbnails of images you paste, above the prompt while you write, and larger pictures under the message once it is sent.plannotatorbacknotpropOpens Claude's plan in a review UI where you mark it up, sends your annotations back, and shows what changed when the plan comes back.filetreedata-goblinDraws an IDE-style file tree beside the transcript that lights up what Claude reads, writes, and commits, and follows it through the folders.skinshellosverreRedraws tool rows, code, diffs, tables, math, and Mermaid charts as cards, with a usage band, a calm mode, and fifteen themes; /skin swaps them live.image-viewjarrodwattsDraws thumbnails of the images you paste, in the band above the prompt, instead of bare [Image #1] tags.crit-tuitomasz-tomczykOpens a pane where you comment on lines of the conversation, the diff, or a file, sends the review to Claude in one go, and threads Claude's replies.time-machineYeonwooSungDraws a branching timeline of Claude's tool calls with a git snapshot after each change, to diff steps, trace a test failure, restore files, or re-run a step.diagram-paneray-amjadPins every diagram Claude draws in a side pane, keeps a live map of the work, and lets you open boxes and change them.
All 145 in Review