No slash command · from Teacher
Builds an animated, step-by-step visual lesson as a self-contained HTML file for explaining concepts that change over time, like protocol exchanges, algorithm traces, or data pipelines.
Ships in Teacher. 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.
What to animate: $ARGUMENTS
Saving and loading progress: in this turn, before you run the save helper or read any of this plugin's files, load the save-progress skill; it is what allows both. Follow ${CLAUDE_PLUGIN_ROOT}/references/saving-progress.md (read it once per session). Session id: ${CLAUDE_SESSION_ID}.
The template at ${CLAUDE_SKILL_DIR}/template.html already contains the player (play, pause, step, speed, keyboard, light and dark themes) and a small drawing library, all in plain JavaScript and CSS with no libraries. You write only the lesson content.
docs/<concept>.html. If that file exists, read it first and keep the student's changes.// __CONTENT_START__ and // __CONTENT_END__ with your LESSON object, your STEPS array, and optionally drawBackground and drawOverlay. Change nothing else in the file.seen ("activity": "demo", the file, and the slug of the topic if it is a saved one).const LESSON = {
title: "TCP three-way handshake",
subtitle: "How two computers agree to talk",
sources: [{ label: "RFC 9293", url: "https://www.rfc-editor.org/rfc/rfc9293" }]
};
const STEPS = [
{
title: "Client sends SYN",
explain: "The client asks to open a connection and proposes a starting number.",
// Required. Called every frame while this step plays; progress runs 0 → 1.
draw(ctx, progress, W, H) {
drawArrow(ctx, W * 0.25, H * 0.25, W * 0.75, H * 0.25, { strokeColor: color('--accent') });
drawMovingPacket(ctx, W * 0.25, H * 0.25, W * 0.75, H * 0.25, progress, 'SYN');
},
// Optional. What stays on screen once the step is over.
drawResult(ctx, W, H) {
drawArrow(ctx, W * 0.25, H * 0.25, W * 0.75, H * 0.25, { strokeColor: color('--accent') });
}
}
];
// Optional: drawn behind every frame (lifelines, grids, fixed labels).
function drawBackground(ctx, W, H) { }
// Optional: drawn on top of every frame (state labels, counters).
function drawOverlay(ctx, W, H, currentStep, progress) { }
title, subtitle, explain and source labels are shown as plain text, so write them as plain text. Only http and https source links are shown.
Always give a step a drawResult when its draw shows something temporary, such as a moving packet or a pop-up. Without it, draw at full progress stays on screen and temporary things pile up across steps.
Every function takes ctx first. Options are optional.
// Shapes
drawBox(ctx, x, y, w, h, { fill, stroke, lineWidth, radius, opacity })
drawCircle(ctx, x, y, r, { fill, stroke, lineWidth, opacity })
drawDiamond(ctx, cx, cy, w, h, { fill, stroke, lineWidth, opacity })
// Text
drawText(ctx, text, x, y, { size, weight, fillColor, align, baseline, maxWidth, opacity })
drawPill(ctx, text, x, y, { fill, textColor, size, px, py, opacity })
// Lines
drawArrow(ctx, x1, y1, x2, y2, { strokeColor, lineWidth, headSize, dash, opacity })
drawLine(ctx, x1, y1, x2, y2, { strokeColor, lineWidth, opacity })
drawDashedLine(ctx, x1, y1, x2, y2, { strokeColor, lineWidth, dash, opacity })
drawCurvedArrow(ctx, x1, y1, cpx, cpy, x2, y2, { strokeColor, lineWidth, headSize, opacity })
// Movement
drawMovingPacket(ctx, x1, y1, x2, y2, progress, label, { fill, textColor, size, width, height })
withGlow(ctx, drawFunction, glowColor, blur)
pulse(time, speed) // swings between 0 and 1
// Maths
lerp(a, b, t) clamp(value, min, max) easeIn(t) easeOut(t) easeInOut(t)
subProgress(progress, start, end) // one part of the step, as its own 0 → 1
Colours come from the theme, so the demo works in light and dark mode: color('--node-a') (first actor), --node-b (second actor), --node-c (a third party), --data (packets and data), --accent (highlights), --success, --warning, --error, --info, --text, --text-muted, --surface, --primary.
draw(ctx, progress, W, H) {
const arrow = subProgress(progress, 0, 0.4); // first 40%: the arrow grows
if (arrow > 0) drawArrow(ctx, x1, y, lerp(x1, x2, easeOut(arrow)), y);
const packet = subProgress(progress, 0.3, 0.9); // then the packet travels
if (packet > 0) drawMovingPacket(ctx, x1, y, x2, y, packet, 'SYN');
const label = subProgress(progress, 0.8, 1); // finally the label fades in
if (label > 0) drawPill(ctx, 'SYN_SENT', x1, y + 30, { opacity: label });
}
W * 0.25, never 200.W * 0.25 and W * 0.75; three at W * 0.2, W * 0.5, W * 0.8.H * 0.1 and leave about H * 0.08 between rows.Math.max(12, W * 0.015).drawBackground draws the actors and their lifelines; each step sends one message.drawBackground draws the array as a row of boxes; steps highlight a comparison, animate a swap, mark an element as settled.drawBackground draws every state and transition dimmed; each step lights up the current state with withGlow.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
17 skills in this plugin
/asciiDraw a quick text diagram directly in the conversation. Use for a simple visual of a sequence, flow, layout, hierarchy or comparison with up to about ten parts. For structures with many parts use excalidraw; for anything that moves or changes step by step use demo./challengeGive the student one short hands-on exercise on a topic they have been taught, wait for their attempt, then evaluate it and record the result. Use when they ask for practice, an exercise or a task, or when an idea they understand in words needs applying./compareBuild a side-by-side comparison of two ideas, with a table, when to use which, and the usual confusions. Use when the student asks for the difference between two things, mixes two ideas up, or has to choose between them.npx claudepluginhub yarikleto/claude-teacher-plugin --plugin teacherOther plugins' skills for the same job