Creates interactive HTML teaching materials with clickable state diagrams. Use when the user asks to produce an explorable tutorial artifact, not to answer a question.
67
81%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
The diagram is a navigation surface. Every element is clickable and opens a detail panel with rich text. The value is in the details, not in the arrows.
When one-word labels on arrows are enough — use Mermaid (draw-mermaid-diagrams). This format is for when every state and transition deserves paragraphs of context, config snippets, HTTP payloads, and debugging tips.
document.createElementNS if offline use is requireddetails: {} — every element must teach somethingDetails is an HTML string combining:
<pre> (the exact artifact)<ul> (what varies)If details is a JS object instead of a string, the template renders it as highlighted JSON — useful for API payloads but not the primary mode.
const TITLE = "string"; // Page title
const DOC_URL = "string"; // Optional link to external docs (shown in toolbar)
const ACTORS = ["A", "B", "C"]; // Horizontal actor columns, left to right
const STEPS = [
{
name: "string", // Required. Short label on the arrow (3-5 words)
from: "A", // Required. Actor name (must match ACTORS)
to: "B", // Required. Actor name (must match ACTORS)
preview: "string", // Optional. Secondary label below the arrow (e.g. "GET /authorize")
description: "string", // Required. 1-3 sentences for the inspector summary
details: "html string" // Required. Rich HTML for the inspector detail panel
}
];const TITLE = "string";
const DOC_URL = "string";
const NODES = [
{
id: "string", // Required. Unique identifier, used in EDGES
type: "action|state|decision|start|end", // Required. Determines shape
label: "string", // Required. Short label inside the shape (2-4 words)
x: 320, // Required. Center X position in pixels
y: 160, // Required. Center Y position in pixels
description: "string", // Required. 1-3 sentences for the inspector summary
details: "html string" // Required. Rich HTML for the inspector detail panel
}
];
const EDGES = [
{
from: "node_id", // Required. Source node id
to: "node_id", // Required. Target node id
label: "string", // Optional. Short label on the edge (e.g. "ok", "fail")
fromSide: "bottom", // Optional. Attach point: "top"|"bottom"|"left"|"right". Default: "bottom"
toSide: "top", // Optional. Attach point. Default: "top"
description: "string", // Required. 1-3 sentences for the inspector summary
details: "html string" // Required. Rich HTML for the inspector detail panel
}
];Node types and their shapes:
action — rounded rectangle (140x44). General processing stepstate — rounded rectangle with gray fill. Resting/waiting statedecision — diamond (60x44). Branching pointstart — filled circle (r=22). Entry pointend — filled circle with inner ring. Terminal stateassets/ — it has a full working example// === DATA === and // === END DATA ===) with your data following the schema abovefromSide/toSide on edgesb4ba256
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.