nogu66/marp-preview/tree/main/plugins/marp-preview
marp-preview
A live Marp slide preview in a Claude Code pane: every slide rendered in one scrolling column, re-rendered on save and scrolled to the slide Claude or your editor just changed.
About this mod
A Claude Code plugin that renders a live Marp slide preview in a pane. Implemented as a single hooks module (hooks/register.tsx) covering session.start, command.run (/marp), ui.render, ui.close and session.end. It finds the deck (optionally via grep for marp: true), starts a long-running marp process with --watch --images png --allow-local-files writing PNGs under /tmp/marp-preview/, and scrolls the pane to the slide just changed. It reads the deck and its mtime but writes nothing to the project and does not touch the network (beyond npx fetching marp-cli).
Installation
Check the author's README for the marketplace and plugin name first. Commands may change as the repository evolves.
claude plugin marketplace add nogu66/marp-preview claude plugin install marp-preview
Original text / README
marp-preview
A live Marp slide preview in a Claude Code pane: every slide rendered in one scrolling column, re-rendered on save and scrolled to the slide Claude or your editor just changed.
Usage, requirements and troubleshooting: github.com/nogu66/marp-preview.
What the hooks do
The plugin is one hooks module, hooks/register.tsx:
| Hook | What it does |
| --- | --- |
| session.start | Registers the /marp command, and resumes following the deck if the pane is still open after a reload |
| command.run (/marp) | Finds or takes the deck, opens the pane and starts marp watching it |
| ui.render (the pane) | Draws every slide's image in one column, which the pane scrolls |
| ui.close | Stops marp when the pane closes |
| session.end | Stops marp when the session ends (not on a /clear, which keeps the pane) |
What it touches
- Files it reads: the deck you open, and its modification time once a second while the pane is open, to see that marp is keeping up. To find a deck when
/marphas no argument it runsgrepformarp: trueover the.mdfiles under the folder the session is in, then over the project. - Files it writes: none in the project. It never changes the deck.
- Processes it runs:
marp(from anode_modulesat or above the deck, elsenpx --yes @marp-team/marp-cli) with--watch --images png --allow-local-files, writing PNGs under/tmp/marp-preview/. It is one long-running process, with the browser marp starts, for as long as the pane is open: started by/marp, restarted if it dies or hangs, and ended when the pane closes, the session ends or the plugin reloads. Also thegrepabove. - Not touched: the network (beyond what
npxdoes to fetch marp-cli), the model, tool calls, the prompt, and settings. - Environment variables: none.
