/visualize:visualizefrom visualize
Draws interactive HTML visualizations (architecture diagrams, charts, UI mockups, comparisons, plans) inline in Claude Code replies. Automatically activates when discussing architecture, flow, metrics, or tunable values.
Ships in visualize. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
One ```visualize fence per visual. claude-ui draws it inline in a sandboxed frame.
How:
<html> wrapper) with the Write tool to visualize/<short-name>.html inside the claude-ui uploads folder: the additional working directory whose path ends in /uploads/<session id>./abs/path/to/uploads/<session id>/visualize/<short-name>.html
Writing the file keeps the HTML out of the streamed reply. No such uploads folder (other engine, no additional directory): put the HTML fragment itself in the fence instead.
Draw one whenever the reply covers, also under terse styles and without being asked:
Plain lists, tables and short answers stay Markdown.
In a question (AskUserQuestion), optional:
preview are Markdown: a visualize or mermaid fence there is drawn. Previews of all options show side by side, so use them to compare options (mock-ups, charts, diagrams).parent.postMessage({v:1,type:"answer",text:"..."},"*") (string, at most 2000 characters). It fills the "own answer" field; the user still submits. Use it for answers that options cannot express: a slider value, a ranking, a point or area on a diagram.Rules:
cdn.jsdelivr.net, cdnjs.cloudflare.com or unpkg.com (Chart.js, D3, Mermaid ESM, ...). Any other host is blocked.fetch/XHR, no storage or cookies, no forms, no popups, no access to the page around the frame. All are blocked.--background, --foreground, --card, --card-foreground, --secondary, --muted, --muted-foreground, --border, --accent, --ring.--primary with --primary-foreground on it.--success, --warning, --destructive, --info.--chart-1 … --chart-8 (distinct hues, readable on --background).--radius, --font-sans.fill="var(--chart-1)". JS (canvas, Chart.js, D3): read with getComputedStyle(document.documentElement).getPropertyValue("--chart-1").trim() and redraw on addEventListener("themechange", draw) (fired after a theme switch updates the variables; CSS var() updates by itself).--background, --foreground text, 13px --font-sans. The frame height follows the content; make the width fluid (width:100%, viewBox), height at most ~800px.position:absolute/fixed content outside the root box, no negative margins pushing out, no 100vh/100%-height layouts; give the root an explicit height when a chart library needs one.Example fragment (the file content, or the fence content without an uploads folder):
<svg viewBox="0 0 240 120" width="100%"><rect x="20" y="70" width="40" height="40" fill="var(--primary)"/><rect x="90" y="40" width="40" height="70" fill="var(--chart-2)"/><rect x="160" y="10" width="40" height="100" fill="var(--chart-3)"/></svg>
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
HTML, CSS, JavaScript, D3.js, Mermaid
visualization, diagrams, charts, html-fragments, inline-rendering
npx claudepluginhub cuonghuunguyen/claude-code-ui --plugin visualizeOther plugins' skills for the same job