Screenshot & Preview Capture
SkillMediaCapture screenshots and videos of the megane viewer for visual review. Use when asked to take screenshots, capture previews, or verify visual output.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Screenshot & Preview Capture skill
What this skill tells your AI
The instructions your AI receives, as published by megane-labs/megane in .agents/skills/preview/SKILL.md and read by ahel’s review.
IMPORTANT: These scripts use Playwright, NOT Puppeteer
All scripts resolve Playwright from /opt/node22/lib/node_modules/.
Dev Preview (screenshots + video for visual review)
Screenshots only
node scripts/dev-preview.mjs --screenshot
or: make preview-screenshot
Video with interaction (rotates molecule)
node scripts/dev-preview.mjs --video --interact
or: make preview-video
Both screenshots and video
node scripts/dev-preview.mjs --interact
or: make preview
Output goes to dev-preview/ directory.
Options
--desktop-only/--mobile-only— limit viewports--duration <ms>— video duration (default 5000)--clean— remove previous captures first
Hero Screenshot (for docs/README)
node scripts/capture-screenshots.mjs
Captures a high-quality 1280x720 DPR=2 screenshot of caffeine_water molecule.
Output: docs/public/screenshots/hero.png.
This script does NOT require WASM (uses pre-parsed JSON data).
Scripted Zoom Demo Video (storyboard-as-code)
Produces a single continuous full-frame webm that walks the live app through
a scripted flow: show the app → type a prompt → (live AI generate) → rotate the
molecule → switch to the Editor tab to reveal the generated pipeline. It is
recorded un-zoomed on purpose (zoom/pan/crop in post): a #root CSS zoom while the
pipeline mounts makes ReactFlow mis-measure node handles and the pipeline edges
detach from the nodes, so the recorder stays at the full view to keep them
attached. (The director still supports zoom verbs/alignTop/scroll for other
storyboards, but the default storyboard does not use them.)
npm run demo:video # no key → prompt typed, generate skipped
ANTHROPIC_API_KEY=sk-ant-... npm run demo:video # live AI generation (local BYOK)
npm run demo:video -- --no-generate # force skip the AI call
# Record the deployed demo site (its built-in LLM proxy runs generation, no key):
npm run demo:video -- --url https://<demo-site>/megane/app/
- Storyboard ("台本"):
scripts/demo-script.mjs— a declarativescenesarray (id / zoom / action / hold). Edit it to change the demo; no need to touch the engine. - Director (engine):
scripts/demo-video.mjs— starts Vite, records a webm via PlaywrightrecordVideo, and zooms by tweening a CSStransformon#root. Verbs:typePrompt(type only),submitPrompt(submit via Enter, then the scene's hold dwells ~30s while the reply streams),rotate,showPipeline(click the Editor tab to reveal the graph). - Zoom control: scene
zoomis"full","keep", or{ sel, scale?, pad?, anchorX?, anchorY?, alignTop?, topMargin? }. The default storyboard uses"full"everywhere (full-frame recording); the zoom options remain available for custom storyboards. - Output:
demo/out/megane-demo-<timestamp>.webm(gitignored). - Options:
--out <path>,--prompt "<text>",--width/--height,--dpr,--no-generate,--generate-timeout <ms>,--clean. - Run locally: the script resolves Playwright via the shared
tests/e2e/utils/playwright.mjshelper (prefers the project's ownnode_modules), so on a local checkout you only neednpm ciplusnpx playwright install chromiumfor the browser. The easiest path is to record the live demo site (no WASM build, no API key):npm run demo:video -- --url https://megane.tech-office-mori.com/. To record a local build instead, omit--url(it builds WASM and starts Vite); live generation there needsANTHROPIC_API_KEYsince the local build has no LLM proxy. - Notes:
deviceScaleFactor: 2keeps CSS-zoomed pixels reasonably crisp. The pipeline panel defaults to the Chat tab, so.react-flowmounts hidden until the Editor tab is selected (thepipelinescene handles this viaactionFirst). Live generation needsANTHROPIC_API_KEY+ network; without them the run still completes (prompt typed, generation skipped).
Prerequisites
- WASM must be built for dev-preview.mjs (it auto-builds if missing)
- capture-screenshots.mjs does NOT need WASM
- Both scripts auto-start and auto-stop a Vite dev server
Cleaning Up
make preview-clean
Removes the dev-preview/ directory.
Signals
- GitHub stars
- 22
- Forks
- 2
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
preview-megane-labs- Source
- github.com/megane-labs/megane