← 返回 Skills 市场
tatsuko-tsukimi

Screencast Studio

作者 TatsuKo Tsukimi · GitHub ↗ · v0.1.1 · MIT-0
cross-platform ⚠ suspicious
53
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install screencast-studio
功能描述
Produce subtitled, cursor-overlay product demo videos from a Playwright-driven walkthrough. Output is a final.mp4 (synthetic cursor lerp + Material click rip...
使用说明 (SKILL.md)

Screencast Demo

Produce subtitled, cursor-overlay product demo videos from a Playwright-driven walkthrough.

The central insight: a Playwright headless recording has no real cursor. The visual cursor + click ripples + subtitles you see in the final video are ffmpeg overlays composed from a structured events log, not real mouse events. This decoupling lets the recording script stay declarative ("click this, narrate that") while the production-quality visuals (smooth cursor lerp, ripple flash, subtitle timing) come for free from the post-processor.

When to use

Activate when the user asks for any of:

  • A polished product walkthrough video of a web app
  • An OSS feature demo for a README or release announcement
  • A bug repro screencast with narrated steps
  • A tutorial / onboarding video showing how to do something in a browser-based UI
  • Anything where the user said "录 demo / 录视频 / screencast / walkthrough video / 演示视频"

Don't activate when:

  • The user wants to record non-browser content (use OBS / native screen recorders)
  • A single screenshot or a static image would suffice
  • The user wants to record real mouse motion (this skill draws a synthetic cursor)
  • The target UI is mobile-only (Playwright supports mobile emulation, but the cursor + ripple visuals are tuned for desktop viewports)

Pipeline overview

gen-cursor + gen-ripple  →  cursor.png, ripple.png        (one-time)
login                    →  storageState.json + page summary
record                   →  raw.webm + events.json
postprocess              →  final.mp4 + subs.srt
deploy                   →  output/screencast-{stamp}.mp4
review                   →  review/{flow,visual,coverage}/*.png
clean                    →  drop scratch files

npm run ship runs record → postprocess → deploy → review → clean as one command.

Bootstrapping a new project

When the user says they want to record a demo for some web app, do this:

1. Gather what you need to know

Ask the user (briefly, ideally in one round):

  • Target URL (the BASE — local http://localhost:3000 or remote)
  • Login path if not /login
  • Working directory for the demo project (e.g. D:\AI\my-demo or ~/projects/my-demo)
  • Whether they need a deploy directory (default is ./output/)
  • Viewport size if other than 1440x900

2. Scaffold the project

Copy templates into the working directory:

templates/record.js          → \x3Cworking-dir>/record.js
templates/postprocess.js     → \x3Cworking-dir>/postprocess.js
templates/review.js          → \x3Cworking-dir>/review.js
templates/login.js           → \x3Cworking-dir>/login.js
templates/gen-cursor.js      → \x3Cworking-dir>/gen-cursor.js
templates/gen-ripple.js      → \x3Cworking-dir>/gen-ripple.js
templates/deploy.js          → \x3Cworking-dir>/deploy.js
templates/clean.js           → \x3Cworking-dir>/clean.js
templates/package.json       → \x3Cworking-dir>/package.json

Then in the working directory:

npm install
npx playwright install chromium

3. Configure

The templates already accept these env vars (no code edit needed for most cases):

  • SCREENCAST_BASE — target URL
  • SCREENCAST_LOGIN_PATH — defaults to /login
  • SCREENCAST_VIEWPORT_W / SCREENCAST_VIEWPORT_H — defaults 1440/900
  • DEPLOY_DIR — defaults to ./output/
  • DEPLOY_PREFIX — defaults to screencast
  • SUBTITLE_FONT — overrides the platform-detected CJK font

For a one-off, edit record.js lines 22-26 directly.

4. Run setup + (optionally) login

npm run setup      # generates cursor.png and ripple.png
npm run login      # opens a real browser; user logs in manually

Skip npm run login if your target page is public (no auth needed). record.js will run without a storageState.json if the file doesn't exist — the demo just won't have any logged-in session. The npm run login step exists specifically for apps behind a login screen.

After npm run login (when used), post-login-summary.json will contain visible nav / heading / button text. Read this file before authoring the stage flow — it tells you what selectors are available without poking the live UI.

5. Author the stage flow

Edit the body of the try { ... } block in record.js (search for STAGE FLOW). Use the helpers documented in references/helpers-api.md. For a fuller pattern guide see examples/walkthrough-flow.md.

6. Ship

npm run ship

This runs the full pipeline (record → postprocess → deploy → review → clean). On a 2-minute demo with ~20 clicks, expect:

  • record: ~2-3 minutes (real-time playthrough plus dwell times)
  • postprocess: ~30-60 seconds (ffmpeg compositing)
  • review: ~30-60 seconds (n × ffmpeg seek+frame extraction; no progress indicator, just waits silently — that's normal)

After it completes, read the review screenshots to verify the demo actually looks correct — see references/known-pitfalls.md for what to watch for.

Authoring helpers (quick reference)

Inside the try { ... } block of record.js:

Helper What it does
await sub('subtitle text') Adds a subtitle event + holds the page for a CJK-aware duration
await click(locator, '操作描述') Cursor moves to target, dwells, clicks, dwells (full ceremony)
await scroll(deltaY, ticks=1) Wheel-scrolls main content area (mouse parks in viewport center first)
await hold(ms=400) Explicit pause
await tryStep('name', async () => { ... }) Non-fatal stage; if it throws, log and continue
page The underlying Playwright Page (escape hatch for anything the helpers don't cover)

Full API in references/helpers-api.md.

Authoring tips

  • Stage flow is a sequence of sub + click + scroll + hold calls. Think of sub as the narrator's voice and click/scroll as the action.
  • Wrap risky steps in tryStep if the UI surface depends on data that may not exist (e.g. an empty list view has no rows to click).
  • Don't fight Playwright's auto-waiting — selectors should target visible elements; if you need to wait for something to appear, use await locator.waitFor({ state: 'visible' }) before clicking.
  • Prefer text-based selectors with exact: true for robustness:
    • page.getByText('Save', { exact: true })
    • page.locator('text=Save') ✗ (matches "Save", "Saved", "Save changes" — substring match)
  • Subtitles narrate, not describe. "进入项目模块" is better than "I am clicking the projects tab".

Prerequisites

See references/prerequisites.md for the full list. Summary:

Auto-installed by npm install: playwright, ffmpeg-static, fluent-ffmpeg

OS-level: Node 18+; chromium binary (one-time npx playwright install chromium); a CJK font (Microsoft YaHei on Windows / PingFang SC on macOS / Noto Sans CJK SC on Linux — the postprocess auto-detects)

Project-specific: the target web app's URL and login credentials; optionally test files for upload stages and a deploy directory

Known pitfalls

See references/known-pitfalls.md. The big ones:

  • Cursor disappears off-frame if a click target is below the viewport — the click helper auto-scrolls into view, but if you bypass it (e.g. raw locator.click()), the synthetic cursor will fly to coordinates outside the recorded frame.
  • Wheel scrolls the wrong container if you don't park the mouse first — the scroll helper does this, but raw page.mouse.wheel(0, dy) from cold-start will scroll whatever element is at (0, 0) (usually the sidebar).
  • text=... is substring match — use getByText(s, { exact: true }) for precision.
  • Subtitle count ≠ done. report.txt shows the events fired, not that the demo looks correct. The 3-pass review screenshots exist precisely so you (or the user) can verify visually after every ship.

Reference docs

Example

安全使用建议
Install only in a fresh, dedicated demo folder. Do not point the working directory at an existing project unless you have reviewed or disabled clean.js. Use a sandbox/test account for authenticated demos, keep storageState.json and post-login artifacts out of source control, and review the generated Playwright flow before running it against real production data.
功能分析
Type: OpenClaw Skill Name: screencast-studio Version: 0.1.1 The screencast-studio skill bundle is a legitimate tool designed to automate the production of product demo videos using Playwright and FFmpeg. It provides a complete pipeline for scaffolding projects, capturing login sessions (login.js), recording browser interactions (record.js), and overlaying synthetic cursors and subtitles (postprocess.js). While the bundle includes a cleanup script (clean.js) that deletes non-whitelisted files and handles sensitive session data (storageState.json), these actions are transparently documented and necessary for the stated purpose of managing a dedicated video production workspace. No evidence of data exfiltration, malicious execution, or harmful prompt injection was found.
能力标签
crypto
能力评估
Purpose & Capability
The Playwright plus ffmpeg pipeline is coherent with producing polished browser demo videos, but it can automate logged-in web UI actions including uploads or other account mutations.
Instruction Scope
The default ship workflow runs a cleanup script that recursively deletes every non-whitelisted entry in the working directory, which is broader than merely removing known scratch files.
Install Mechanism
Setup is user-directed but pulls npm dependencies and a Playwright Chromium browser; the package ranges are not fully pinned in the supplied template.
Credentials
Running Playwright browsers, ffmpeg child processes, and writing local media/review artifacts is proportionate for video production, but it is nontrivial local execution.
Persistence & Privilege
Authenticated runs persist storageState.json plus post-login screenshot/summary files in the project directory; this is useful for repeat recordings but should be protected or deleted.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install screencast-studio
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /screencast-studio 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.1
Rename: screencast-demo → screencast-studio. Old name read as 'a demo of screencast' rather than 'a tool for recording demos'. No functional changes.
v0.1.0
Initial public release. Subtitled cursor-overlay screencast pipeline (Playwright + ffmpeg). 8 templates + 5 references + anonymized walkthrough example with sample output (final.mp4 + 4 frames). Cross-platform CJK font detection (Windows / macOS / Linux).
元数据
Slug screencast-studio
版本 0.1.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Screencast Studio 是什么?

Produce subtitled, cursor-overlay product demo videos from a Playwright-driven walkthrough. Output is a final.mp4 (synthetic cursor lerp + Material click rip... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 53 次。

如何安装 Screencast Studio?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install screencast-studio」即可一键安装,无需额外配置。

Screencast Studio 是免费的吗?

是的,Screencast Studio 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Screencast Studio 支持哪些平台?

Screencast Studio 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Screencast Studio?

由 TatsuKo Tsukimi(@tatsuko-tsukimi)开发并维护,当前版本 v0.1.1。

💬 留言讨论