Nov 21, 2026

html-explainer Renders Explainer Videos From HTML — No Video Model Required

An agent skill turns a topic into a narrated MP4 with burned-in subtitles by writing HTML/CSS scenes and rendering them frame by frame — fully local, zero API keys on the core path.

#tutorial#creative#developer-tools#productivity

Text-to-video models bill you per render and still can't keep on-screen text crisp. html-explainer takes the opposite route: the agent writes each scene as HTML/CSS/GSAP, a browser draws the pixels frame by frame into a real MP4 — not a screen recording — and the pipeline runs fully local on the core path, with zero API keys and zero per-render fees. You hand it one sentence ("Make a 1-minute explainer video about why the sky is blue") and it walks through research, script, voiceover, subtitles, scene authoring, render, QC, and covers.

Why This Skill Matters

It ships as a proper Agent Skill (SKILL.md + scripts/ + references/), loadable by Claude Code, OpenAI Codex, WorkBuddy, Cursor, Gemini CLI and others, and under the hood it's plain Python and Node you can also run by hand. Three design decisions do the heavy lifting. First, animations anchor to narration text via a B('block text') beat system — pure functions of t, seekable by construction — so editing the script re-times the whole video with zero scene-code changes. Second, subtitle timing comes from the TTS engine's character-level timestamps rather than interpolation by character count, which matters in Chinese where two phrases of equal length can differ three times in duration. Third, style_director.py reads the script, infers each scene's role, and orchestrates 23 visual styles across 8 categories plus a 40+-action motion library — not one template per video. The README's own benchmark framing: a 2-minute video is roughly 3600 frames at 1080p30, with rendering measured at 16.4 frames/s, and 4K60 is what costs multiples.

Installation

The recommended path is one prompt to your agent:

Install this Skill into my local environment: https://github.com/OneMoh/html-explainer.git
Put it in your skills directory and check/install the required runtime
(Python 3.9+ / Node 18+ / Chrome or Edge / ffmpeg)

Then start a new session so the agent rescans its skills directory. Manual install works because the repository root is the skill directory:

git clone https://github.com/OneMoh/html-explainer.git ~/.workbuddy/skills/html-explainer
bash ~/.workbuddy/skills/html-explainer/setup_env.sh --install

Requirements are Python 3.9+ (edge-tts is pinned at 7.3.1 because Microsoft rejects 7.2.8 handshakes with 403), Node 18+, a Chrome or Edge browser, any ffmpeg (with a static-binary fallback), and about 2GB of disk per video. No GPU and no model weights. The README's per-agent table lists where the skill directory lives for each host, and notes that Claude Code only reads .claude/skills/.

Real Workflow: Make a One-Minute Explainer

  1. Give the agent the topic sentence and let the pipeline run: research (every figure carries a source) → script split into subtitle blocks by | → voiceover → subtitles and beats → style orchestration and scene authoring → render → QC → covers.
  2. Make the two decisions the pipeline reserves for you. The voiceover engine: edge-tts is the free, keyless default; Volcano Engine TTS 2.0 bills per character and sounds better — when you pick it, the skill creates a tts.env and stops so the key never enters the chat, the transcript, or the logs. The render channel is also yours: four options from the default --png-fast (pixel-lossless, smaller than JPEG q95 on pure graphics frames) to --jpeg --jpeg-quality 95 (first choice for full-frame photos), and gate_check.py blocks the render until your choices exist in consent.json.
  3. Pick a profile if you care about output quality: draft for iteration, balanced (1080p30, 180° shutter) as the default, final for 4K60, master for maximum quality. Profiles only change deviceScaleFactor — never the layout.
  4. Collect the output from out/: slug.mp4, cover_169.png and an independently re-laid-out cover_34.png (not a crop), slug.srt/slug.vtt, plus a qc_report.md and qc_sheet.jpg.

Three pre-render audits run before any pixels render: check_beats_refs.py (does every B() reference resolve), lint_frames.py (eight contract rules), and check_layout.mjs (overflow, subtitle-band intrusion, overlap).

Tips

  • Read references/lessons.md before debugging anything from scratch: 133 numbered entries, each a bug where the video looked fine but was wrong, including how it was first misdiagnosed.
  • The 30-minute end-to-end figure is the README's own order-of-magnitude framing, not a promise — the real variables are research depth and how many times you revise the visuals.
  • On Windows, keep project paths ASCII (ffmpeg reads UTF-8 as ANSI), and run setup_env.sh from Git Bash, not PowerShell.
  • A real 5982-frame film took 7 min 49 s end to end per the README — rendering is the cheap part.
  • The methodology credits anything2explainer and html-video as sources of ideas; neither is bundled nor a runtime dependency.

When Not to Use This

The README's own poor-fit list is explicit: live-action editing, talking-head footage, re-creating an existing video, wanting a drag-and-drop editor (scenes are code, deliberately), or wanting a text-to-video model to produce the pixels. And the full command sequence and several reference documents are Chinese-only, so plan to follow them from the zh surfaces even in the en README's flow.


See the leaderboard for more skills.