From diagram
Use when a visual model would help explain or communicate a request, even if the user does not explicitly ask for a diagram. Useful for code module dependencies, call chains, architecture, workflows, state transitions, data models, sequence flows, and other relationships.
How this skill is triggered — by the user, by Claude, or both
Slash command
/diagram:drawThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill when a visual model would clearly improve understanding, including requests about dependencies, call chains, architecture, workflows, state transitions, data models, or other relationships.
Use this skill when a visual model would clearly improve understanding, including requests about dependencies, call chains, architecture, workflows, state transitions, data models, or other relationships.
zenuml by default for sequence diagrams and interaction flows unless the user explicitly asks for Mermaid's native sequenceDiagram syntax.sequenceDiagram only when the user explicitly requests it or provides existing sequenceDiagram source that should be preserved.flowchart for process flow, branching logic, decision trees, or procedural steps.classDiagram for entities, classes, properties, methods, and relationships.stateDiagram-v2 for lifecycle, status transitions, or finite state behavior.erDiagram, journey, gantt, gitGraph, mindmap, timeline, architecture, kanban, packet, quadrantChart, xychart, sankey, venn, ishikawa, block, treemap, treeView-beta, wardley-beta, and the C4* family.ok: false, repair the Mermaid once and run the draw CLI again.create_diagramly_diagram tool with the diagram source.create_diagramly_diagram returns diagramly.status: "created", return the standard local report and include the Diagramly.ai PreviewUrl.create_diagramly_diagram returns diagramly.status: "authorization_required", first return the standard local report with htmlPath, svgPath, and pngPath, then ask whether the user wants to create a https://diagramly.ai online diagram for long-term storage and sharing.
start_diagramly_auth tool, show the returned diagramly.loginUrl (for example, https://diagramly.ai/auth/device?code=ABCD-2345), and immediately call the complete_diagramly_auth tool, waiting until it returns diagramly.status: "authorized" (user authorization succeeded) or reports an error/expiration.create_diagramly_diagram again with the same diagram source, then return a complete report again with htmlPath, svgPath, pngPath, and the Diagramly.ai PreviewUrl.Use the plugin-bundled draw CLI for local validation and rendering. Do not install Mermaid, mermaid-core, @mermaid-js/mermaid-cli, or other rendering dependencies dynamically.
Resolve the installed draw CLI path before invoking it. Do not assume the shell's current working directory is this skill directory.
DRAW_CLI="${CLAUDE_PLUGIN_ROOT:+$CLAUDE_PLUGIN_ROOT/skills/draw/scripts/draw.js}"
if [ -z "$DRAW_CLI" ] || [ ! -f "$DRAW_CLI" ]; then
DRAW_CLI="$PWD/plugins/skills/draw/scripts/draw.js"
fi
if [ -z "$DRAW_CLI" ] || [ ! -f "$DRAW_CLI" ]; then
DRAW_CLI="$(find "$HOME/.codex/plugins/cache" "$HOME/.codex/.tmp/marketplaces" -path "*/skills/draw/scripts/draw.js" -type f 2>/dev/null | sort | tail -n 1)"
fi
if [ -z "$DRAW_CLI" ] || [ ! -f "$DRAW_CLI" ]; then
echo "diagram draw CLI not found in the installed plugin payload." >&2
exit 1
fi
node "$DRAW_CLI"
Send one JSON object on stdin. The command has no arguments and always returns one JSON object on stdout. Omit outputDir for normal use; the renderer writes outputs under its default temp root (/tmp/dv/<renderId> on non-Windows platforms, or the OS temp directory on Windows). Only set outputDir when the user explicitly asks for a custom local output location.
Input shape:
{
"source": "flowchart TD\nA-->B",
"title": "Optional title",
"theme": "default",
"renderId": "example"
}
Output shape:
{
"ok": true,
"diagramType": "flowchart",
"renderId": "example",
"displayText": "...",
"htmlPath": "...",
"svgPath": "...",
"pngPath": "...",
"diagnostics": []
}
Do not skip validation unless the user explicitly asks for raw Mermaid only. Do not read repo source files or use ad hoc rendering commands as a fallback for normal diagram requests. If the packaged runtime is missing, report the packaging error directly and stop. If a plugin tool reports a runtime or startup failure, stop and surface that error clearly instead of exploring the repo. Do not narrate internal exploration during healthy runs.
displayText, reproduce that displayText verbatim in every answer that reports local results.create_diagramly_diagram.PreviewUrl in the final answer.authorization_required, do not block or replace the local report. Ask whether the user wants a https://diagramly.ai online diagram for long-term storage and sharing before starting authorization.Status, Diagram Type, HTML Path, SVG Path, PNG Path.n/a for unavailable fields instead of omitting them.complete_diagramly_auth until authorization is confirmed, then retry create_diagramly_diagram to create the final Diagramly.ai diagram preview URL.stateDiagram-v2, make transitions explicit and use labels only when they add meaning.flowchart, avoid deeply nested branching when a simpler path is possible.zenuml and sequenceDiagram, define participants clearly before complex interactions.zenuml when the interaction includes nested calls, branching, loops, or code-like control flow.zenuml, use the dedicated zenuml skill for syntax, examples, and drafting patterns.zenuml unless the user explicitly asks for sequenceDiagram.flowchart.classDiagram.stateDiagram-v2.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub zenuml/diagram --plugin diagram