Skip to content
Skills Library
Design & UX · Conversion & formats

viz-render

/viz-render

Render markdown or Mermaid content as formatted HTML in the browser. Triggers when the user asks to view, render, or preview a document as HTML; when the user asks to visualize, diagram, chart, or draw architecture, flows, sequence/class/state/ER diagrams; when resolving plan files from ~/.claude/plans/; or proactively when about to output a table over ~20 lines or with 4+ rows and 3+ columns, a structured comparison, an audit, a feature matrix, or any formatted content exceeding ~20 lines in the terminal.

Repository
cc-plugins ↗
Licence
MIT
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
5
Scripts
0
HTML comments
0
URLs in SKILL.md
3
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Render markdown or Mermaid content as formatted HTML in the browser. Triggers when the user asks to view, render, or preview a document as HTML; when the user asks to visualize, diagram, chart, or draw architecture, flows, sequence/class/state/ER diagrams; when resolving plan files from ~/.claude/plans/; or proactively when about to output a table over ~20 lines or with 4+ rows and 3+ columns, a structured comparison, an audit, a feature matrix, or any formatted content exceeding ~20 lines in the terminal.

Original author description

Render markdown or Mermaid content as formatted HTML in the browser. Triggers when the user asks to view, render, or preview a document as HTML; when the user asks to visualize, diagram, chart, or draw architecture, flows, sequence/class/state/ER diagrams; when resolving plan files from ~/.claude/plans/; or proactively when about to output a table over ~20 lines or with 4+ rows and 3+ columns, a structured comparison, an audit, a feature matrix, or any formatted content exceeding ~20 lines in the terminal.

How it works

  1. When NOT to Use
  2. Input Shapes → Workflow
  3. Generating Mermaid From Scratch
  4. Output
  5. Recipes (interactive HTML artifacts)
  6. References
Original SKILL.md headings · 143 lines, 787 words
SKILL.md preview
---
name: viz-render
description: >-
  Render markdown or Mermaid content as formatted HTML in the browser.
  Triggers when the user asks to view, render, or preview a document as HTML;
  when the user asks to visualize, diagram, chart, or draw architecture,
  flows, sequence/class/state/ER diagrams; when resolving plan files from
  ~/.claude/plans/; or proactively when about to output a table over ~20 lines
  or with 4+ rows and 3+ columns, a structured comparison, an audit, a feature
  matrix, or any formatted content exceeding ~20 lines in the terminal.
---

# Viz Render Skill

Render markdown documents, Mermaid diagrams, or plan files as formatted HTML
with syntax highlighting, math formulas, and Pele diagrams (Mermaid syntax), in the dark-only
Musingfox design system. One skill, one script, three input shapes.

Requires macOS (`open`, `stat -f`), `python3`, `curl`, `lsof`, and network
access for the CDN that loads Pele, KaTeX, and highlighting.

## When NOT to Use

- Short non-table content (<20 lines) or simple diagrams (2–8 nodes) — use the
  viz-inline skill's chat shapes (call tree, pseudocode, diff) instead
- User explicitly wants terminal/text output
- User is asking to edit or modify the content, not view it

## Input Shapes → Workflow

### Shape A: file path

User gave an absolute/relative path to a markdown file.

```bash
bash "${CLAUDE_PLUGIN_ROOT}/lib/render.sh" "{file_path}" "doc-{name}"
```

### Shape B: plan name (bare name, no path separator, no `.md`)

List available plans or resolve by name against `~/.claude/plans/`:

```bash
INPUT="$ARGUMENTS"
PLANS_DIR="$HOME/.claude/plans"

if [ -z "$INPUT" ]; then
    echo "Available plans in $PLANS_DIR:"
    ls -t "$PLANS_DIR"/*.md 2>/dev/null | head -20 | xargs -n1 basename | sed 's/\.md$//' | sed 's/^/  - /'
elif [ -f "$INPUT" ]; then
    DOC_FILE="$INPUT"; DOC_NAME=$(basename "$DOC_FILE" .md)
    bash "${CLAUDE_PLUGIN_ROOT}/lib/render.sh" "$DOC_FILE" "doc-$DOC_NAME"
else
    DOC_FILE="$PLANS_DIR/$INPUT.md"
    [ -f "$DOC_FILE" ] && bash "${CLAUDE_PLUGIN_ROOT}/lib/render.sh" "$DOC_FILE" "doc-$INPUT" \
      || { echo "Plan not found: $INPUT.md"; ls -t "$PLANS_DIR"/*.md 2>/dev/null | head -10 | xargs -n1 basename | sed 's/\.md$//' | sed 's/^/  - /'; }
fi
```

### Shape C: inline content or Mermaid code

Write the content (or Mermaid wrapped in a ```` ```mermaid ```` fence) to a
temp markdown file, then render.

For inline markdown, write to `/tmp/viz-doc-{timestamp}.md`.

For bare Mermaid code, wrap as:

````markdown
# {Diagram Title}

```mermaid
{mermaid code}
```
````

…write to `/tmp/viz-diagram-{name}.md`, then:

```bash
bash "${CLAUDE_PLUGIN_ROOT}/lib/render.sh" "/tmp/viz-diagram-{name}.md" "diagram-{name}"
```

## Generating Mermaid From Scratch

When the user requests a diagram without providing the code:

1. Pick a diagram type (see `references/diagram-types.md` for syntax)
2. Keep it focused: descriptive labels <30 chars, no-space IDs
3. If requirements are too broad, suggest splitting into multiple diagrams
4. After rendering, ask the user to confirm the diagram drew: Pele runs in
   the browser, and a syntax error shows as red text in place of the diagram,
   visible only to them

## Output

The render script prints the output HTML path (under `/tmp/viz/{project}/`),
then a `URL:` line, and opens that URL in the default browser. Every render goes
through the local viz server on `127.0.0.1`; only when no port is free does it
fall back to opening the file and print no URL. Report the path to the user.

Over SSH (`SSH_CLIENT` or `SSH_CONNECTION` set) the server binds `0.0.0.0`, the
`URL:` line carries the Tailscale IP, and no browser opens. Report that URL to
the user instead of the path.

## Recipes (interactive HTML artifacts)

If the markdown file starts with frontmatter `viz: <recipe>`, the render
script swaps the generic viewer for a recipe-specific interactive template.
Recipes treat markdown as the canonical source: the HTML reads from it on
load and exports a roundtrippable markdown back to the clipboard on Export.

Use a recipe when the user wants an output they will iterate on (mark items
as done/wontfix, filter, edit fields), not just read.

Available recipes:

- **pr-review** — severity-grouped finding cards with status badges,
  inline-editable metadata, and severity filters. See
  `references/recipes/pr-review.md` for the markdown structure spec.
- **feedback** — renders any markdown read-only and collects a structured
  answer (option pick + notes) written back into frontmatter; a round of
  several decisions opens on a card view projected from the body, with the
  verbatim markdown one click away. See `references/recipes/feedback.md`.

Controls: **Save** writes the edit back to the source `.md` (labelled 儲存回饋
in feedback); **Export** copies the updated markdown to the clipboard (labelled
複製 in feedback).

Workflow:

1. Author the markdown with the recipe's frontmatter and structure.
2. `bash "${CLAUDE_PLUGIN_ROOT}/lib/render.sh" <file.md> <output-name>`
3. Arm the Monitor from `references/recipes/round-trip-monitoring.md` on the
   source file; the user edits in HTML and clicks Save, which wakes you to read
   the file back.
4. Fallback when the page opened over `file://` (Save hidden): the user clicks
   Export and pastes the markdown to chat; overwrite the source `.md` and
   re-render.

Markdown without `viz:` frontmatter falls through to the generic viewer
unchanged.

The viz server, and with it the recipe Save endpoint, listens on port `18090` by default. If that port is
held by another process, render.sh auto-selects the next free port (trying
up to 5 candidates) so the recipe still opens over `http://` — no manual
override needed. Set `VIZ_PORT=<port>` only to pin a specific base port.

## References

- **Diagram type syntax**: `references/diagram-types.md`
- **Recipe specs and round-trip monitoring**: `references/recipes/`
- **Mermaid docs**: https://mermaid.js.org/
- **Live editor**: https://mermaid.live
Files in this package (5)
  • SKILL.md 6 KB
  • references/diagram-types.md 4 KB
  • references/recipes/feedback.md 8 KB
  • references/recipes/pr-review.md 4 KB
  • references/recipes/round-trip-monitoring.md 2 KB

Versions

The database has no other skills named viz-render.

Database snapshot: 13.11.2026 · package version 325e52ec781a (SHA-256 digest of the entire package)

Downloads in the last 30 days: 2 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 86mermaid
    Render a Mermaid diagram in the terminal with termaid. Use when the user asks to draw, render, preview or check a Mermaid diagram, a file containing one, or the diagrams in a Markdown document, PR description or README.
  • 95mermaid
    Render Mermaid diagrams as SVG or ASCII art using beautiful-mermaid. Use when users need to create flowcharts, sequence diagrams, state diagrams, class diagrams, or ER diagrams. Supports both graphical SVG output and terminal-friendly ASCII/Unicode output.
  • 95mermaid
    Render Mermaid diagrams as SVG or ASCII art using beautiful-mermaid. Use when users need to create flowcharts, sequence diagrams, state diagrams, class diagrams, or ER diagrams. Supports both graphical SVG output and terminal-friendly ASCII/Unicode output.
  • 100visual-explainer
    Generate beautiful, self-contained HTML pages that visually explain systems, code changes, plans, and data. Use when the user asks for a diagram, architecture overview, diff review, plan review, project recap, comparison table, or any visual explanation of technical concepts.…
  • 95pretty-mermaid
    Generate and render Mermaid diagrams for architecture docs, READMEs, PRs, terminals, chats, and CI as themed SVG, PNG, or ASCII/Unicode art. Use this skill whenever the user provides Mermaid code or .mmd files; asks for a flowchart, sequence/state/class diagram, ERD, XY chart,…
  • 100diagram-lint
    Produce, check and render architecture diagrams as code. Use when adding a diagram, editing a Mermaid .mmd source or a draw.io generator script, rendering the .svg and .png outputs, or checking a draw.io layout before trusting it.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.