/visualization:visualize [<medium>] [--unattended]from visualization
Routes visualization requests to the best visual form (mermaid diagram, table, chart, sketch, or page) and medium. Decides what to show and how to show it based on conversation context.
Ships in visualization. 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.
Read when SKILL.md points to them.
On demand, at any point in a conversation, decide what is most worth showing visually and how to show it, then render it. This skill is a form + medium router: it makes two decisions, the form and the medium, and produces the output.
/visualization:visualize.Two decisions, then the rendered output:
Read where the conversation stands and identify the single thing most worth showing: a process just described, a set of options compared, a trend in some numbers, a structure being designed. Usually one target dominates. If two or more are equally plausible and the user named no form, that is genuine ambiguity. Carry it to Step 4. Otherwise proceed with the dominant target. Read the chat history first: the thing just discussed, pasted, or changed is usually the target, and a shape already shown earlier in the conversation is usually what a follow-up question is about.
Match the shape of the content to a form. The full catalog lives in
context/decision-matrix.md: every mermaid
diagram family and when each fits, the zero-dependency chart primitives, and the
rendering-surface facts these rest on. The summary:
| Content shape | Form |
|---|---|
| Flow, process, hierarchy, sequence, state, relationships, timeline | a mermaid diagram (pick the family per the catalog) |
| Attributes or options compared across items | a markdown table |
| Quantities: trend, distribution, proportion, ranking | a chart. Route the craft to a chart-craft/dataviz capability |
| Small structural sketch, box layout, a directory tree as structure | ASCII / Unicode art |
| Logic described in prose, or an algorithm before it is written | pseudocode (a code-shape sketch) |
| A call path through named functions: orchestration, control flow, a backend-shaped problem | a call tree (a code-shape sketch) |
| A UI's component tree, with the state hooks and module boundaries that matter | a component tree with file paths (a code-shape sketch) |
| Where things live, or the scope of a refactor | a shallow file tree, one line of responsibility per entry (a code-shape sketch) |
| The shape of code before any of it exists | types and signatures (a code-shape sketch) |
| What changes, when the surrounding shape is already in the conversation | a diff-shaped delta over any of the shapes above (a code-shape sketch) |
| Mostly new code, or a copyable target shape, when no sketch is smaller than the code | the whole block, the fallback among the code-shape sketches |
| A composite, interactive, or large multi-part view; an infographic | a rich rendered page |
| A slide deck | hand off to /visualization:present, which builds it from the account's Slides Artifact type |
| A visual layout the user would rather tweak by hand: a UI mockup, screen flow, poster, banner, one-pager | a rich rendered page, with the design canvas (/design, the bundled design skill, which the person runs) offered alongside it |
Code-shape sketches are fenced text: they render in any GFM surface and need
no page. Tie-break against the mermaid row: when the content is code (named
functions, files, components, types), prefer a code-shape row; when it is a
process, sequence, or state in the domain, prefer a mermaid family. Pseudocode
never paraphrases pasted code when a structural form answers the question. Pick
the smallest view that makes the key point clear, place it beside the short
text it supports, keep only the calls, files, props, states, and boundaries the
question needs, and use one form, sometimes several, rarely all.
context/code-shapes.md has a section per form, most with an
example; its paths and identifiers are placeholders.
A diagram that will be committed to the repository (a doc, ADR or README) is Mermaid source, over
any canvas or page, so it diffs and reviews as text. The one exception is the excalidraw-file
diagram target (Step 3): the person chose a diagram file they edit by hand, and that file is the
diagram.
When the form is a chart and a chart-craft/dataviz capability is enabled, invoke it for the craft (form heuristic, palette, mark specs); when it is not enabled, fall back to a simple, honest default (a labeled bar/line as inline SVG on a page, or a Unicode bar/sparkline in the terminal) and say the craft capability was unavailable.
When the form hand-authors CSS or SVG styling outside the page chrome (Step 3), use /user-interface:write-css (if enabled) to write that CSS, since it applies the project's design system and conventions first; without it, write the CSS here. The page chrome stays governed by the bundled chrome reference either way.
When the form is a hand-tweakable visual layout, render this skill's rich page
(or the form Step 3's resolved medium calls for) and offer the person the
design canvas. The canvas is the bundled design skill, which is reserved for the
person to run: the model never invokes it. It exists only on the published-Artifact
tier, so the offer is also gated on Step 3's medium selection: when the resolved
medium keeps delivery on the machine (its publishes is false), do not offer it.
Where the medium permits publishing, offer it as an explicit alternative, never a
silent default: the canvas is a published, persistent Artifact the person edits
and shares (how, per the pointer in
the catalog's design canvas section), where
this skill's page paths are throwaway or plain-static. The Boundary section below carries the sentence to offer and its gate
basis; the canvas surface facts and their verified-on/recheck record live in the
catalog spoke.
The media are the medium registry's fallback chain (lib/view-registry.mjs), richest
first; the resolver steps a medium down that chain until this session can reach it. Selection
layers, first hit wins:
Explicit argument. A medium named as the argument forces it. With no argument, the layers
below decide. The argument picks only the medium; name a form in the request itself.
--unattended, anywhere in the arguments, is neither a medium nor part of the target: it is the
caller declaring that nobody is present. Take it out first, then read the rest.
Resolved preference. Run the shared medium resolver, adding --argument <medium>,
<medium> being the argument's word, when there is one. <option> is this plugin's medium
option, ${user_config.medium} ("" if empty/unsubstituted), and <branding JSON> is
${user_config.branding} (omit --branding-option when empty/unsubstituted; otherwise
single-quote it, escaping any ' as '\'', never double-quote JSON or put ${user_config.*} in shell):
node "${CLAUDE_PLUGIN_ROOT}/lib/view-settings.mjs" resolve --producer visualization:visualize --option "<option>" [--argument <medium>] [--branding-option '<branding JSON>']
It prints one JSON line, then the report line naming the medium and what decided it, then any
notice; print those lines as they stand. It weighs the argument, this plugin's medium option
and the repository's rendered-views convention files, and never publishes on a team file's
say-so; do not read or weigh those files yourself. Exit 2 means the argument named no medium:
say so in one line and run it again without --argument. With a medium set, deliver by the
JSON's page and publishes: page false renders in the terminal; publishes true publishes
the page, under the surface gate below; otherwise the page is a local HTML file. A medium of
null means no setting decided, so layer 3 resolves. When node is missing, say so in one line
and let layer 3 decide.
Auto. Decide by the form and its weight: no page for small, static,
text-representable output (tables, ASCII, short code, a mermaid source fence);
a rich page for a composite, interactive, large, or truly graphical result
(rendered diagrams, real charts, dashboards).
Whichever layer decides, name it in the output: the resolver's report line, or "shipped
default" for auto. Copy the resolver's view: ... report line and each notice into the reply word for word. When the form is a diagram, also resolve diagram_target as Diagram target below says, on every surface including the terminal, and print its one line and any unavailable line in their exact form.
Surface gate: the rich page is a capability that can be absent. A published Artifact is gated; the catalog's availability entry points at the live conditions. So when a page is warranted: publish an Artifact only if that surface is available; otherwise write a self-contained local HTML file and open it; if neither page surface is available, degrade visibly to the best terminal form with a one-line notice. Never assume the Artifact surface exists. A medium that does not publish keeps the page on the machine; a publishing one prefers publishing but degrades the same way.
When a canvas server is connected, read ${CLAUDE_SKILL_DIR}/context/collaborative-canvas.md "Canvas server"; its hosted_canvas option value is ${user_config.hosted_canvas}.
When the form is a diagram, read ${CLAUDE_SKILL_DIR}/context/diagram-target.md to resolve diagram_target; its option value is ${user_config.diagram_target}, and its <plugin-root> is ${CLAUDE_PLUGIN_ROOT}.
Code-shape sketches take these same layers (under auto they build no page, per
layer 3; an argument or resolved medium is honored for them as for any form), with
one exception: a pull-request diff, fetched content, or another repository's files
are never rendered to HTML until this skill is wired through the rendered-views escape helper, and
never written to a diagram file. That exception overrides layer 1, the preference and
diagram_target; when a page or file was asked for, say in one line why it was not produced.
When the medium is a rich page or a local file, read ${CLAUDE_SKILL_DIR}/context/rich-page.md before authoring; its <plugin-root> is ${CLAUDE_PLUGIN_ROOT}.
Parse every mermaid block before it is emitted, whatever the medium. Write each diagram to a
.mmd file (or use the markdown file holding the ```mermaid fence) and run:
node "${CLAUDE_PLUGIN_ROOT}/lib/mermaid-gate.mjs" [--svg-dir "<dir>"] <file>...
Stdout is one JSON report; each block has file, line, status (ok or error) and render
(svg or source). Exit 1 means a block failed to parse. For a local file, pass --svg-dir and
embed the SVG a block names in place of the fence. For an Artifact, omit --svg-dir and run the parse
only (why: the catalog's Published Artifact entry).
status: error: do not write the page. Report the block's file, line and error, fix the
diagram, run the gate again.render: source: keep the mermaid source and print the block's reason beside it. Never call
such a page rendered.mmdc the parse is a structural check (unknown diagram type, unterminated quote,
unbalanced flowchart brackets), so say an ok does not prove every syntax error is absent.mmdc only at the minimum version in prerequisites.json or newer, found on PATH
or at node_modules/.bin/mmdc under the working directory. An older one is treated as absent.
A failure that is not a parse error (no Chrome) falls back to source with the failure as the
reason. Pointer: https://github.com/mermaid-js/mermaid-cli/releases. Recheck when the
Artifact runtime's Mermaid version (see context/decision-matrix.md) moves to a different major.node "${CLAUDE_PLUGIN_ROOT}/lib/prerequisites.mjs" check "${CLAUDE_PLUGIN_ROOT}" --data-dir "${CLAUDE_PLUGIN_DATA}".Honor a preference without overproducing: a publishing medium still renders a trivial three-row table inline, and a medium with no page degrades a rich form to its best terminal approximation with a visible note rather than dropping detail silently.
Two things can be ambiguous independently: what to show (the target) and which form. Ask the user one question, with a RECOMMENDED default listed first, when either is genuinely ambiguous:
The pasted-code case honors ${user_config.thin_context_prompt}. Read an empty
value, or one that still reads as an unsubstituted ${user_config…} placeholder,
as unset, and apply auto (how a saved option reaches skill content:
Reference a saved value).
auto is the behavior above; always offers the
ranked menu on any bare code paste; never renders the recommended form without
asking. Any other value is reported and treated as auto.
When neither is ambiguous, meaning a dominant target and a clear best form, proceed with the matrix's pick: good defaults, no nagging. A specified form or medium is honored and simply removes that axis from any question, with one carve-out: Step 3's terminal-only exception for a pull-request diff, fetched content, or another repository's files overrides a requested medium that shows a page. Never interrogate form by form; one question, then render.
```mermaid block as portable source the user can render elsewhere,
and prefer a page when the rendered diagram is the point.context/decision-matrix.md. When the subject is a
product UI, match that product's own colors, type, spacing, and components rather than the
plugin chrome; use real labels and data; support desktop and mobile./visualization:present
It turns the material into a slide deck when the request is for slides rather than one visual.
excalidraw-file target is not a canvas. It needs no server, so an absent Excalidraw
server is no reason to fall back; only a missing repository, a failed structural check, or an
existing file you may not replace is. The file it leaves is untracked work in the person's
repository: report the path and leave staging to them.An interactive parameter explorer whose output returns as a prompt (controls
beside a live preview with a copy-out prompt, the "playground" shape) is not a form
this skill renders. When the first-party playground plugin is enabled, route the
request to its playground skill, or to the playgrounds wrapper's /playgrounds:use (if enabled)
when that wrapper is enabled, which also owns the install uplift and cloud delivery
guidance. When neither is enabled, say the capability exists as an installable
plugin and continue with this skill's closest static form (a rich page without the
round-trip controls), never a hand-built imitation of the explorer.
The design canvas is the bundled design skill, a native surface this skill overlaps on
hand-tweakable layouts, so a request for a mockup or a one-pager can mean either:
design (bundled skill): drafts artboards on one canvas the person keeps and edits
(what it publishes and where it is edited:
Artifacts: Draft a design canvas).
It is reserved for the person to run; the model does not invoke it.Native suggestions are on unless native_suggestions resolves off: a personal docs/conventions/visualization.local.yaml value wins over the team docs/conventions/visualization.yaml value, which wins over the per-user value ${user_config.native_suggestions} (a literal unexpanded token means unset); with none set they are on. A value other than on or off is named and that layer dropped: a valid higher layer still wins, otherwise on, never a lower layer's value. When off, skip the /design sentence below and write nothing in its place, not even a note that it was skipped or why.
Routing: when the form is a hand-tweakable layout and Step 3's medium permits publishing,
render this skill's page and tell the person: If /design is available in your session (gate
basis: the verification record below) and native suggestions are on (native_suggestions, Configuration), you can run it instead of or alongside this skill for a
hand-editable design canvas. Treat a design entry in your skill listing as a local skill
shadowing the bundled command (how same-name skills resolve:
Skills, "Resolve skills that share a name"):
do not make the offer, and tell the person a local design skill shadows the bundled canvas command. A local design skill that disables model
invocation shadows it too and is hidden from you, so every offer adds that /design's description
should read "Make a new Design artifact from a brief"; anything else is a local skill, not the
canvas, and not to be run for it. When the caller passes --unattended, omit the suggestion, write
Withheld suggestion (unattended): /design in the run's output and do not ask the person.
Mutation gate: the canvas publishes a persistent Artifact under the person's account, so it is never a silent default and nothing tracked in a repository references it. This skill never runs it.
Verification record, design. Our binary extraction of Claude Code 2.1.285 reads the
bundled design registration as model-invocation-disabled, user-invocable and gated, which is
why this skill only ever offers it. Settings can remove it; which settings, and how, are read from
the pointers in the catalog spoke's design canvas section
(context/decision-matrix.md),
which owns the remaining surface facts.
design records in docs/native-surfaces/records.json.design registration model-invocable, changes its
description (the identity string the offer quotes), changes its gating, or splits or merges its
registrations.A request to draw a layout or a deck can name a Claude Design project the person already has, and then it means that project, not a new render:
ClaudeDesign (built-in tool): the editor for a claude.ai/design project the person
already has; the model calls it by name. A new Design artifact comes from the bundled design
skill above, which the person runs
(Artifacts: Draft a design canvas).Routing: when the person names or links an existing claude.ai/design project, or asks for the
work to go into one, and the ClaudeDesign tool resolves in this session, use that tool for the
project's files. Otherwise this skill renders its own output as today. The tool is the project's
editor; this skill is the form and medium router.
Mutation gate: a ClaudeDesign write changes a project the person's team shares. Write only
to the project the person named, and only after they asked for the change. When the tool asks for
an approval or refuses a write, report it and never retry around it. The approval and refusal
cases are probed behavior recorded in
context/claude-design-tool.md.
The charts mod, built-in cc-plugin-easel, overlaps this skill on one form: a chart in the transcript. Where it loads and how it is turned off live on the upstream pages that context/easel-mod.md points to, beside the records behind this routing.
Routing: when a transcript chart of quantities is asked for and the mod's chart tool resolves in this session, use that tool; this skill keeps every other form and medium, and draws its own chart wherever the mod is absent. It never switches the mod on or off.
figma-generate-diagram (marketplace plugin): draws a diagram in a FigJam file; the model or the person invokes it (records: ${CLAUDE_SKILL_DIR}/context/figma-generate-diagram.md). Routing: when the person asks for FigJam as the medium, resolve hosted_canvas and print its line as ${CLAUDE_SKILL_DIR}/context/collaborative-canvas.md "Canvas server" says, then route to /figma:figma-generate-diagram (if enabled); this skill keeps every other medium. Mutation gate: we treat FigJam as a hosted canvas, so route only on the person's own FigJam request, and never when hosted_canvas is deny or the resolved medium keeps delivery on the machine (publishes false); then, or when the skill is not enabled, say why in one line and render here.SendUserFile (built-in tool): sends a session file to the person; the model calls it (records). Routing: when SendUserFile resolves in this session, send a page this skill wrote as a local HTML file (Step 3) with it, rendered, as well as reporting its path. Mutation gate: when the resolved medium keeps delivery on the machine (publishes false), do not send it.education:illustrate (if enabled). This skill picks a form for what is already in the conversation.excalidraw-file target leaves the file untracked for the person to review.context/claude-design-tool.md (opens in a new tab)context/code-shapes.md (opens in a new tab)context/collaborative-canvas.md (opens in a new tab)context/decision-matrix.md (opens in a new tab)context/diagram-target.md (opens in a new tab)context/easel-mod.md (opens in a new tab)context/figma-generate-diagram.md (opens in a new tab)context/rich-page.md (opens in a new tab)context/send-user-file.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub melodic-software/claude-code-plugins --plugin visualization2 skills in this plugin
Other plugins' skills for the same job