Get started
Merlive is a skill for your coding agent. It turns the Mermaid already in your Markdown into diagrams that look planned, in your own colours, that readers can step through. Your Mermaid stays the source and is never changed.
Install it
npx skills add victorsaly/merlive -gIt works with any agent that reads Agent Skills: Claude Code, Codex, Cursor, OpenCode. It needs Node 22 or later, and nothing else: no packages, no browser, no network.
As a Claude Code plugin, so that updates come through /plugin:
/plugin marketplace add victorsaly/merlive
/plugin install merlive@merlive
Ask
Say it to your agent, with the file that has the Mermaid in it:
Merlive docs/orders.md
The first time in a project, it sets itself up without asking: it reads your site's own colours, writes merlive.design.json, and tells you in a sentence what it found. How it finds your colours.
Then it checks each block of Mermaid against its rules and draws it. You get one page for each diagram, in a diagrams folder beside your Markdown file:
docs/orders.md
docs/diagrams/orders-1.html
docs/diagrams/orders-2.html
What you wrote, and what you get
This is a block of Mermaid as it sits in a Markdown file. The lines that start %% are comments, which every other Mermaid renderer ignores: here they give two boxes a note and the diagram two steps to walk.
flowchart TD
A([Submit order]) --> B[Validate order]
B --> C{Within budget?}
C -->|Yes| D[Manager approval]
C -->|No| E[Revise order]
E --> B
D --> F([Order placed])
class E rework
%% note C: Compares the order total with what is left in the budget.
%% note E: The requester changes the order, then it is validated again.
%% step: The straight path | A>B>C>D>F | Within budget, so it goes to the manager.
%% step: The revision loop | loop 1 | Over budget, so the requester revises and it is validated again.
And this is what Merlive draws from it:
- The main path is one straight line, and everything else sits to one side of it.
- Every box is one size, on a grid. The rhombus is still a rhombus, no bigger than the boxes round it.
- Lines turn at right angles and go round boxes, each with a place of its own to leave from.
- The page is live. Pick a box or a line to see only what it connects to. Walk the steps. Nothing moves until the reader presses play.
- It is one file, with nothing fetched. It works offline, and prints with its notes at the end.
Try it with your own Mermaid, without installing anything.
Without an agent
The skill is one script. Copy skills/merlive/ from the repository and run it with Node:
node skills/merlive/scripts/merlive.mjs docs/orders.md --check # what would be drawn; writes nothing
node skills/merlive/scripts/merlive.mjs docs/orders.md # docs/diagrams/orders-1.html
node skills/merlive/scripts/merlive.mjs docs/orders.md --format svg # a still picture, for a wiki
node skills/merlive/scripts/merlive.mjs --setup --from https://your.site # your colours, once
Where to go next
- Why not a theme: what is wrong with a Mermaid diagram that a theme cannot fix.
- What it draws: thirteen kinds of diagram, and what is read of each.
- Notes, steps and the main path: the lines you can add to your Mermaid.
- The library: every sample, drawn by Mermaid and by Merlive.
Written from site/pages/start.md in the repository, so the two cannot disagree.