html-to-video-pipeline

html-to-video-pipeline is a skill for Claude Code, Codex from XiaomiMiMo/MiMo-Code. It costs 0 tokens per session (4,331 once invoked), scanned B, original, MIT.

A workflow for turning an HTML, CSS, and JavaScript page into a reliable MP4 video using a headless browser and video encoding tools.

In plain words
What is it for?
Use it to render animated web pages or multiple HTML compositions into videos, while checking viewport size, loading, capture timing, trimming, and encoding.
Why use it?
It addresses common export problems such as missing fonts, incorrect timing, unloaded assets, blurry scaling, and extra frames at the start.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/xiaomimimo/mimo-code/html-to-video-pipeline
Any agent
npx skills add XiaomiMiMo/MiMo-Code --skill html-to-video-pipeline
Clone the repo
git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for html-to-video-pipeline

README.md
[![agentmods](https://agentmods.dev/badge/skills/xiaomimimo/mimo-code/html-to-video-pipeline.svg)](https://agentmods.dev/skills/xiaomimimo/mimo-code/html-to-video-pipeline)
Your own site
<a href="https://agentmods.dev/skills/xiaomimimo/mimo-code/html-to-video-pipeline"><img src="https://agentmods.dev/badge/skills/xiaomimimo/mimo-code/html-to-video-pipeline.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,331 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.04331
Opus 5 $0.00000 $0.02166
Sonnet 5 $0.00000 $0.00866
Haiku 4.5 $0.00000 $0.00433

Measured 4d ago against content hash 94c8e9144f8f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

html-to-video-pipeline scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo apt-get update && sudo apt-get install -y ffmpeg
packages/opencode/src/skill/builtin/.bundle/html-to-video-pipeline/SKILL.md · 237 lines

How it starts

The opening of the file, as written. The whole thing — 237 lines — stays where its author put it; the contents beside it link to each section on GitHub.

HTML → Video: the pipeline that actually works

Turning a live HTML page into an MP4 sounds like a one-liner ("Playwright records, ffmpeg encodes") and the first draft always looks fine — until you play back the export and notice text flashing in a fallback font, three dead seconds at the start, or a "10-second" clip that clocks in at 35s. This skill captures the specific ordering, waits, and encoder flags that make the output trustworthy.

Think of the pipeline as five phases with a single invariant between them:

launch  →  hold @ frame 0  →  align capture start with animation start  →  record  →  trim & encode

The invariant: no pixel of the animation should render before capture is ready, AND capture must not start before every asset that affects layout has loaded. Every gotcha below is a violation of that invariant.

Quick checklist (each item is expanded below):

  1. viewport must exactly equal recordVideo.size — mismatch silently rescales the output soft/blurry.
  2. Freeze CSS animations via addInitScript before goto().
  3. goto with domcontentloaded, never load.
  4. Pre-inline data-composition-src sub-scenes — file:// blocks client-side fetch.
  5. Font wait = stylesheet <link> load → face.load() per face → fonts.ready → 2 rAFs.
  6. Probe duration with infinite-iteration / repeat: -1 guards.
  7. Unfreeze = t=0; trim leadInMs − 120ms with -ss before -i.
  8. Concat: same engine → demuxer -c copy; mixed engines → concat filter + re-encode.
  9. Verify with ffprobe duration + full decode + sampled frames. Always.

There are two capture modes, and picking the wrong one wastes a day:

  • Mode A — real-time recordVideo (the phases below). Simple, wall-clock = clip length. But the screencast is best-effort variable frame rate (~25fps) and competes with the animation for CPU. Good enough for previews and ≤30fps deliverables on an idle machine.
  • Mode B — deterministic frame stepping (pause everything, seek to i / fps, screenshot, encode the PNG sequence). Exact fps, every frame rendered, no lead-in trim, immune to machine load. Required when the output must be genuinely smooth ≥30fps or renders run on loaded CI. See "Deterministic frame stepping" below.

Read the full file on GitHub · 237 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 237 lines · 0 tokens per session scan B 94c8e9144f8f

Subscribe to this mod's changes

html-to-video-pipeline is a skill published in the GitHub repository XiaomiMiMo/MiMo-Code (12,939 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,331 tokens. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

use-agent-browser-for-airi

Test AIRI display-model imports with agent-browser across stage-tamagotchi Electron, stage-web, and stage-pocket mobile web layouts. Use when uploading and verifying contributor-supplied Live2D ZIP, VRM, or MMD ZIP/PMX/PMD files through AIRI's model selector, including onboarding bypass, format-specific import…

moeru-ai/airi · 87 tokens

pinchtab-mcp

Use this skill when a task requires browser automation through PinchTab's MCP server connected to a remote browser instance. Covers navigation, element interaction, data extraction, form filling, multi-step flows, and session management via MCP tools.

pinchtab/pinchtab · 52 tokens

web-browser

Automate and interact with web pages through Chrome or Chromium using the Chrome DevTools Protocol (CDP): navigate, click, fill forms, inspect content, take screenshots, and debug console or network activity. Use when an agent needs a real browser. Prefer headless Chrome unless visible browser interaction is required.

mitsuhiko/agent-stuff · 64 tokens

traceway-setup

Analyze and instrument repositories for Traceway observability. Use when the user wants to plan, add, migrate, or verify Traceway or OpenTelemetry monitoring for backend, browser, full-stack, mobile or iOS, or AI-agent software, including project topology and user-approved setup-plan creation. Backends use OTLP/HTTP…

tracewayapp/traceway · 134 tokens

browser_cdp

通过 Chrome DevTools Protocol (CDP) 连接已运行的浏览器,或扫描本机 CDP 端口,用于远程调试与多工具共享浏览器实例。.

mateaix/mateclaw · 44 tokens

kane-cli

Browser automation + AI test authoring via kane-cli - run browser objectives, generate & refine test scenarios/cases from a description, design requirement-linked test suites from a PRD/spec (assurance), parse NDJSON output, inspect logs, save runnable test.md. Use for any task requiring a real browser (navigate…

LambdaTest/kane-cli · 159 tokens