Skip to Content
MeowKit
Skills

mk:preview

Renders code, architecture or a git diff as a markdown or self-contained HTML explanation, diagram, slide deck or diff view.

Source.claude/skills/preview/SKILL.md
Ownerdocs
Runtimeclaude-code
Riskmedium
Phaseon-demand

What it does

Renders code, architecture or a git diff as a visual explanation, diagram, slide deck or diff view, in markdown or as a self-contained HTML page. There is no live server. Reach for it when a reader needs to understand an unfamiliar code path, a diagram would show a topology faster than prose, or a pre-PR diff needs a visual summary.

When not to use

NeedUse
Publish-grade SVG or PNG diagram filesmk:tech-graph
Plan critique or scope reviewmk:plan-ceo-review
A review verdictmk:review
A diagram inside a READMEmk:mermaidjs-v11

Usage

CommandOutput
/mk:preview --explain <topic>Markdown explanation with ASCII and Mermaid
/mk:preview --diagram <topic>Markdown diagram
/mk:preview --slides <topic>Markdown slides
/mk:preview --ascii <topic>Terminal-friendly ASCII diagram
/mk:preview --html --explain <topic>HTML explanation, opened in the browser
/mk:preview --html --diagram <topic>HTML diagram with zoom and pan
/mk:preview --html --slides <topic>HTML slide deck
/mk:preview --html --diff [ref]HTML diff view: KPI grid, file map, change cards

For --diff, ref defaults to main and can be a branch, commit, range or PR number (a PR number needs gh). --ascii does not combine with --html. With no arguments the skill asks which operation you want.

Steps

  1. The skill resolves flags, then reads the references for the mode (references/generation-modes.md, mermaid-essentials.md, html-design-rules.md, analytical-modes.md) and the HTML template from assets/.
  2. It turns the topic into a slug: lowercase, hyphens, 80 characters at most.
  3. It writes the file and prints the path. In headless, SSH or WSL environments it prints the path instead of opening a browser.

Output

If .meowkit/state/active-plan exists, files go to {plan}/visuals/; otherwise to tasks/visuals/, with a warning on stderr. An existing file is overwritten. HTML pages are self-contained, 500 KB at most, load Mermaid from a CDN, and have a light and dark toggle. --diff only displays the change. The verdict stays with mk:review.

Gotchas

TrapDetail
Mermaid .node classPage CSS named .node leaks into Mermaid diagrams. Name card classes differently.
Mermaid themeIt is read once at load, so switching the page theme does not re-skin the diagram.
Topic textIt is untrusted. HTML output encodes < > & " '.
Slug mismatchTruncation at 80 characters can give a filename that differs from the title.

On this page