agentleFS
parthjshah95parthjshah95/visual-planning-skills/skills/visual-explainer/SKILL.md

visual-explainer

Skill14 starsChanged 2 months agoMITView on GitHub

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).

27 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use verification-before-completion.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • OpenAISkill

    verification-before-completion

    Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. 0 are common, 9 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 25 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    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.

    line 21
  2. Very specific:

    Read every file listed under ## Style in the custom instructions first.

    line 64
  3. Distinctive:

    Use an available browser preview to inspect each scene when possible.

    line 95
  4. Distinctive:

    Check that labels fit, elements remain visible, and arrows reach their targets.

    line 96
  5. Distinctive:

    If no browser preview is available, check the HTML source and report that visual inspection was unavailable.

    line 98
  6. Distinctive:

    Do not launch Chrome or Chromium from a shell script for this check.

    line 99
  7. Distinctive:

    Do not add an automatic layout audit to the HTML.

    line 100
  8. Distinctive:

    Read every heading, label, caption, and narration as a newcomer: the real-world meaning comes before code names, jargon is removed, and …

    line 105
  9. Very specific:

    Check every human-readable string against the asd-ste100 skill: 20-word instructions, 25-word descriptions, active voice, simple tenses, …

    line 108
  10. Very specific:

    Write the file to the Output: Path pattern when the custom instructions set one, else to <out>/<slug>.html.

    line 113
  11. Very specific:

    If the custom instructions set Output: Publish, run it with the file path substituted for <file>.

    line 115
  12. Very specific:

    All CSS in one <style>, all JS in one <script>, all art as inline <svg>.

    line 147
  13. Distinctive:

    Put every actor in the SVG once.

    line 151
  14. Very specific:

    Use viewBox="0 0 W H" + preserveAspectRatio, size with CSS width:100%.

    line 168
  15. Distinctive:

    Don't ship claims you didn't verify — label modeled/inferred parts explicitly.

    line 200
  16. Distinctive:

    Keep it one file; resist pulling in chart/diagram libraries.

    line 203
  17. Very specific:

    Test the very first and very last scene — off-by-one in the data-scene map is common.

    line 204

“Common” is measured: kept by at least 6 in 10 of the 25 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

/visual-explainer <subject> [instructions=<path>] [out=<dir>]

A team's own rules live in a custom-instructions file, the same file format the visual-plan skill reads. Pass it with instructions=<path>; otherwise a custom-instructions.md at the workspace root is used; otherwise the defaults apply. This skill reads two of its headings:

HeadingWhat it holdsDefault
## StylePaths of writing-rule files to read before any human-readable text is written, on top of the always-mandatory asd-ste100 skill.None.
## OutputPath: a file path pattern with <slug> and <YYYY-MM-DD> placeholders. Publish: a command or skill to run after the render check passes, with <file> as the placeholder. Report: what to tell the user after publish.<out>/<slug>.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 <base>/llms.txt and <base>/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 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 <script src>, no <link href> to CDNs, no web fonts that require network — use system font stacks).
  • Read every heading, label, caption, and narration as a newcomer: the real-world meaning comes before code names, jargon is removed, and every necessary term or abbreviation is defined before use.
  • Check every human-readable string against the asd-ste100 skill: 20-word instructions, 25-word descriptions, active voice, simple tenses, and no -ing verbs.

7. Deliver

  1. Write the file to the Output: Path pattern when the custom instructions set one, else to <out>/<slug>.html.
  2. If the custom instructions set Output: Publish, run it with the file path substituted for <file>. If a credential or tool is missing, keep the local file and report each missing prerequisite by name.
  3. Open the file for the user and print the absolute path. Add the published URL when Output: Report asks for it.

Non-negotiable technical patterns

Avoid innerHTML (some harnesses block it; it is safer regardless)

Render dynamic text through DOM nodes only. Storing rich text as arrays of typed segments and building them with createElement sidesteps HTML injection entirely — and some agent harnesses run a security hook that rejects a Write containing innerHTML. This exact renderer is the reusable core:

const ALLOWED_TAGS = new Set(["strong", "em", "code"]);
function renderSegments(target, segments) {
  target.textContent = "";                 // clear
  for (const seg of segments) {
    if (typeof seg === "string") {
      target.appendChild(document.createTextNode(seg));
    } else if (seg && ALLOWED_TAGS.has(seg.tag)) {
      const el = document.createElement(seg.tag);
      el.textContent = String(seg.text ?? "");
      target.appendChild(el);
    }
  }
}
// data:  body: ["Plain ", {tag:"strong", text:"bold"}, " then ", {tag:"code", text:"x()"}]

Single self-contained file

All CSS in one <style>, all JS in one <script>, all art as inline <svg>. No CDNs, no external fonts, no images. It must work opened directly from disk (file://) and offline.

CSS-driven scene state machine (declarative, animatable)

Put every actor in the SVG once; show/position per scene with attribute selectors. Drive it by setting one attribute in JS.

.actor { opacity: 0; transition: opacity .5s ease, transform .8s ease; }
.stage[data-scene="3"] .actor-hero { opacity: 1; transform: translateX(120px); }
.stage[data-scene="3"] .speech-3   { opacity: 1; }
function setScene(n) {
  stage.setAttribute("data-scene", "0");                 // reset so CSS re-fires
  requestAnimationFrame(() => requestAnimationFrame(() =>  // double rAF = clean re-trigger
    stage.setAttribute("data-scene", String(n))));
}

Responsive SVG

Use viewBox="0 0 W H" + preserveAspectRatio, size with CSS width:100%. Never hardcode px width on the root SVG.

Life via CSS keyframes

A few looping animations make it feel alive: pulse (heartbeats), drift (tumbleweed/clouds), smoke, flicker (lanterns/signs), spin (gears/loops), dash (animated dashed flow lines via stroke-dashoffset).

Controls + a11y

Prev / Replay / Auto-play / Next, clickable progress dots, and keyboard nav (ArrowLeft/ArrowRight/space/r). Make clickable cards/dots real <button>s or add tabindex="0" + a keydown handler.

Interactivity beyond next/prev

  • Hover tooltips on diagram parts (.thing:hover .label { opacity:1 }).
  • Filter chips that dim non-matching items (data-f + a matches() predicate).
  • Morph toggle (body[data-mode="..."]) to cross-fade two states.
  • Clickable detail panel fed by a JS data array (single source of truth for content).

Aesthetic checklist

  • Distinct theme + palette as :root variables; warm, cohesive, intentional.
  • Display font for headings, mono for code/labels, serif/system for body (system stacks only).
  • Cards: subtle border + offset shadow; hover lift.
  • Hand-drawn SVG "cartoons" for concepts — simple flat shapes, recognizable, charming.

Gotchas (learned the hard way)

  • innerHTML → the Write may be rejected by a security hook, and it is an injection risk regardless. Use renderSegments above.
  • Corrupted/placeholder hex colors silently drop the declaration (e.g. a typo'd #3a4straight). After writing, grep: grep -nE '#[0-9a-fA-F]*[g-z]{2,}' and fix hits.
  • Don't ship claims you didn't verify — label modeled/inferred parts explicitly.
  • Dense technical shorthand may be accurate and still fail to explain. Translate it into plain language instead of putting the shorthand in a glossary and making the reader decode it.
  • Keep it one file; resist pulling in chart/diagram libraries.
  • Test the very first and very last scene — off-by-one in the data-scene map is common.
  • Long labels in a fixed-width box are the top overflow cause. Wrap with <tspan> lines or a <foreignObject>, or widen the box; never shrink the font below 11 px to make it fit.

Reference example

examples/pipeline-explainer.html is a complete, working explainer that demonstrates every pattern above: a morph toggle, a scene player with a narrator panel, a hand-built mermaid-style architecture diagram, a comparison table, inline-SVG cartoons, and the safe renderSegments core. Copy it as a starting skeleton and replace the content arrays.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.