--- name: visual-explainer description: Generate a single-file, interactive HTML explainer for a concept, system, tool, architecture, or workflow — with hand-drawn inline-SVG illustrations, an animated scene-player or pipeline, mermaid-style diagrams, and a glossary. Use when the user asks to illustrate, explain, visualize, or build an interactive walkthrough/explainer of how something works as an HTML page (not a slide deck, not prose). --- # Visual Explainer — Illustrated, Interactive HTML Produce a polished, self-contained `.html` file that *teaches how something works* through illustration and interaction — not by prettifying its docs. The output is one file with no external dependencies (no CDNs, no build step) that opens in any browser. This skill encodes a repeatable method and a set of battle-tested code patterns. Follow the method; reuse the patterns verbatim. ## When to use - "Create an HTML explainer / illustration of X." - "Visualize / illustrate how X works, with animations and interactivity." - "Make an interactive walkthrough of this system/architecture/workflow." Do **not** use for: static reports (use a doc/pdf/pptx tool), real product UI work (use a frontend-design skill), or plain prose answers. ## Inputs and custom instructions ```text /visual-explainer [instructions=] [out=] ``` A team's own rules live in a **custom-instructions file**, the same file format the `visual-plan` skill reads. Pass it with `instructions=`; otherwise a `custom-instructions.md` at the workspace root is used; otherwise the defaults apply. This skill reads two of its headings: | Heading | What it holds | Default | | --- | --- | --- | | `## Style` | Paths of writing-rule files to read before any human-readable text is written, on top of the always-mandatory `asd-ste100` skill. | None. | | `## Output` | `Path:` a file path pattern with `` and `` placeholders. `Publish:` a command or skill to run after the render check passes, with `` as the placeholder. `Report:` what to tell the user after publish. | `/.html` (default `out` is the current directory); no publish. | An explicit `out=` argument wins over `Output: Path`. Custom instructions add settings only; they never change the method below. ## Method (do these in order) ### 1. Research first — never illustrate from memory The fastest way to ship a *wrong* explainer is to infer the subject. Before drawing anything: - Pull the real source: fetch the docs, read the actual repo/files, run the tool. - For doc sites, try `/llms.txt` and `/llms-full.txt` — they often list every page and dump full text. - **Mark confirmed vs inferred.** Anything you couldn't verify is a guess; label it as such in the output (e.g. a "modeled, verify" note) rather than asserting it. If a later fetch contradicts an earlier claim, fix the explainer — overstating capabilities is the #1 failure mode of these explainers. ### 2. Write in plain language before drawing The words carry as much of the explanation as the pictures. **Every human-readable string in the output MUST follow the [`asd-ste100`](../asd-ste100/SKILL.md) skill, strictly.** This covers narration, scene text, captions, diagram labels, decision text, and glossary entries. It does not cover code, identifiers, or quoted strings. That skill sets the sentence form: at most 20 words for an instruction and 25 for a description, active voice, simple tenses, no `-ing` verbs, noun clusters of at most 3 words, one term per concept, and no ellipsis. Read every file listed under `## Style` in the custom instructions first; it applies on top of `asd-ste100`. The `asd-ste100` skill governs how to build the sentence. These points govern what to say: - **Behavior before mechanism.** Say what the thing does, and what the reader sees, before you name the machinery. - **Define every term before its first use.** Give a one-line definition the first time a non-common word appears. Do not carry undefined shorthand forward. - **Translate shorthand.** Dense technical shorthand can be accurate and still fail to explain. Translate it. Do not drop it into a glossary and make the reader decode it. ### 3. Pick one concrete example to walk through Abstract explainers don't land. Choose a single realistic task/ticket/request and follow it end-to-end through the system. Reuse the *same* example across sections so the reader builds one mental model. (e.g. one order walked through all the stages of a checkout pipeline.) ### 4. Pick a palette Pick a tight palette as CSS variables and use it everywhere. Distinctive beats generic: a warm, cohesive palette reads better than default centered Inter on white cards. ### 5. Build with the standard structure 1. **Header** + a ribbon stating the concrete example (the "ticket"). 2. **Concept cards (optional)** — a labeled inline-SVG picture of each part, when seeing the parts helps. 3. **The interactive centerpiece** — pick one: - *Scene player*: N scenes, a `data-scene` state machine, narrator panel, prev/next/autoplay. - *Pipeline / timeline*: clickable stages with a detail panel + filter chips. - *Morph toggle*: cross-fade between two framings (e.g. before/after) via `data-mode`. 4. **Mermaid-style architecture diagram** — hand-built SVG (boxes + arrowhead markers), *not* the mermaid.js library (keep it dependency-free). 5. **Glossary** + an "extras / worth knowing" grid. ### 6. Verify before finishing - Use an available browser preview to inspect each scene when possible. Check that labels fit, elements remain visible, and arrows reach their targets. Fix defects that you find. If no browser preview is available, check the HTML source and report that visual inspection was unavailable. - Do not launch Chrome or Chromium from a shell script for this check. Do not add an automatic layout audit to the HTML. - Open it mentally: every scene/stage reachable, no actor stuck visible/invisible. - Grep your own file for broken hex colors and stray placeholder tokens. - Confirm zero external requests (no `