跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
设计与 UI

cutaway

Record polished browser workflow demos with animated zoom, a smooth cursor, motion blur, and local MP4 export, and frame screenshots with the same look. Use for web UI demos and tutorials in one Chromium tab, and for still evidence on cards or PRs.

half144 · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add half144/cutaway --skill cutaway

技能说明


name: cutaway description: Record polished browser workflow demos with animated zoom, a smooth cursor, motion blur, and local MP4 export, and frame screenshots with the same look. Use for web UI demos and tutorials in one Chromium tab, and for still evidence on cards or PRs.

Cutaway

Turn the requested workflow into one JSON plan, then capture and export it with the bundled CLI. The CLI controls Playwright; no additional model or video service is needed.

Fast path

  1. Reuse the current conversation: app URL, running dev server, implemented feature, selectors, tests and known success state. If these are already known, write the plan directly. Otherwise inspect only the route or controls needed for this recording, using existing tests/source or a targeted browser inspection. Do not perform a fresh project audit, whole-repository search, build, or full test suite just to record a demo. Start the app only if it is not already available.
  2. Write a short plan for the requested outcome. Prefer stable test IDs, IDs or input names already verified in code/UI. Include necessary navigation and a visible success indicator. Avoid rehearsing the entire workflow before recording when the available context is sufficient. Avoid fixed waits when expect can wait for the actual result; leave pause unset unless extra reading time is useful.
  3. Run the command below once. It checks dependencies automatically before browser actions, captures, and exports the final video. Do not run a preview followed by a final export by default.
  4. Review the exported video or representative frames at interactions, zoom transitions and the final result. If the result is correct, deliver it. Re-render only for a concrete visual defect or a requested variant; re-record only for an actual capture/action problem and when replay is authorized.

Use scripts/run.mjs next to this skill, with its absolute path. It resolves the linked repository automatically; the working directory can remain the user's application. Use absolute plan/output paths. Do not copy the skill scripts into the target project or reimplement the recorder.

node <skill-directory>/scripts/run.mjs record /absolute/plan.json --out /absolute/new-recording

Default output is 1920×1080 at 60 fps: the Sonoma Horizon wallpaper (after npm run wallpapers; the bundled macOS wallpaper otherwise), a browser window with traffic lights and address bar, Screen Studio-style zoom shots at 1.5×, a human-paced cursor and temporal motion blur. New captures use lossless PNG at 2× physical resolution and high-quality H.264 export (--quality high, CRF 16). Keep this quality for showcase videos. For PR evidence, bug repros and quick previews, add --width 1280 --height 720 --quality standard: it stays legible in GitHub's player, exports about 3× faster (~0.7 s per second of video on an Apple M4, against ~1.8 s at the default) and keeps ~30 s of video under the 10 MB attachment limit on free plans. Export already uses up to half the CPU cores in parallel processes, so run one export at a time.

Plan

{
  "url": "http://localhost:3000/projects",
  "steps": [
    { "action": "click", "selector": "[data-testid=edit-project]" },
    { "action": "type", "selector": "input[name=title]", "text": "Website atualizado" },
    { "action": "click", "selector": "button[type=submit]", "expect": "[data-testid=saved]" },
    { "action": "focus", "selector": "[data-testid=project-title]", "duration": 1 }
  ]
}

Selectors are Playwright locators: CSS plus role=textbox[name="Email"], :has-text("Continue") and :text-is("Skip"), which help when the app has no test IDs. Each must match exactly one element. The example selectors are placeholders for your app, not selectors to guess. expect must identify the actual result, not an always-visible empty container. Default capture scale: 2× (2880×1620 source pixels at the default viewport). Set captureScale: 3 in the plan for a 4K delivery when useful; source dimensions must remain at most 8192 pixels. Default viewport: 1440×810 (16:9, matching the export); override with viewport only when the app needs a different size. hide at the plan root takes CSS selectors (not Playwright ones) removed from every frame, such as ["nextjs-portal"] for the Next.js dev tools badge on a dev server. colorScheme: "dark" at the plan root opens the page in dark mode, for apps that follow the system appearance or when the user asks for a dark recording.

Actions: click; type (replaces text with visible typing); focus (frames a visible element without clicking); scroll (y relative pixels, optional duration); press (key, e.g. Enter); wait (duration seconds); upload (selector of the button that opens the file chooser, file as a path or array of paths relative to the plan: the click is shown, no native dialog opens and the files go straight to the page). Each step accepts pause and expect (visible selector). Leave pause unset for adaptive human pacing: after clicks and keys the capture waits for animations to settle, and an expect result stays on screen long enough to register (0.6 s + 0.15 s per word, 0.8–1.6 s). Pauses vary slightly, like a person's. Set pause only when the content needs a deliberate editorial hold. Give important steps an expect: the camera frames that result with the clicked control, or moves to it. timeout at the plan root sets action timeout in milliseconds (default 10000, maximum 120000). Use a larger focus container when surrounding context matters; tall regions are framed from the top. A short closing hold and zoom-out are already included. Zoom is for local detail: a click whose effect fills the screen (a chart redraw, a panel opening) plays out on the overview, while typing, menus and small effects get a close-up. Local actions less than ~3 s apart share one continuous close-up, which holds 1.8 s after the last click, even during a network wait, s

阅读完整来源 ↗