← 返回
内容创作 中文

Video Proof

Record video proof of implemented features after coding tasks complete. Use when a coding agent finishes work and needs to visually verify and demonstrate th...
在编码任务完成后录制已实现功能的视频证据。当编码代理完成工作并需要视觉验证和演示功能时使用。
rikisann
内容创作 clawhub v1.0.2 1 版本 100000 Key: 无需
★ 1
Stars
📥 794
下载
💾 11
安装
1
版本
#latest

概述

Video Proof

Record video demos of implemented features using Playwright's built-in screen recording. After a coding task completes, this skill starts your app, runs a scripted walkthrough, and captures video + screenshots + console logs as proof artifacts.

Works with any stack — Next.js, Vite, Django, Rails, Go, Docker, static files, or an already-running server. You provide the start command; the skill handles the rest.

Prerequisites

Run once per machine:

bash scripts/setup.sh

Installs Playwright (Chromium), ffmpeg, and the yaml npm package.

Quick Start

Option A: YAML Proof Spec (recommended)

Create a proof-spec.yaml:

proof:
  start_command: "npm run dev"       # any shell command that starts your app
  start_port: 3000                   # port to poll before recording begins
  base_url: "http://localhost:3000"
  steps:
    - goto: "/dashboard"
    - wait: 2000
    - screenshot: "dashboard-loaded"
    - click: "text=Create New"
    - wait: 1000
    - assert_visible: "text=New Item"
    - screenshot: "item-created"

Run it:

node scripts/record-proof.js --spec proof-spec.yaml --output ./proof-artifacts

Option B: Inline CLI (simple cases)

node scripts/record-proof.js \
  --start "python3 -m http.server 8080" \
  --port 8080 \
  --url http://localhost:8080 \
  --goto "/" \
  --screenshot "home" \
  --output ./proof-artifacts

Option C: Already-running server (no start_command)

Omit start_command — the script skips server startup and goes straight to recording:

proof:
  base_url: "https://staging.myapp.com"
  steps:
    - goto: "/login"
    - screenshot: "login-page"

Artifacts Produced

proof-artifacts/
├── video.webm            # Full screen recording
├── video.mp4             # Chat-friendly version (auto-converted via ffmpeg)
├── screenshots/          # Named screenshots from steps
│   ├── dashboard-loaded.png
│   └── item-created.png
├── console.log           # Browser console output (errors, warnings, logs)
└── proof-summary.md      # Markdown report with pass/fail status per step

Exit code: 0 if all steps pass, 1 if any step fails. On failure, a FAILURE.png full-page screenshot is captured automatically.

Start Command Examples

The start_command field accepts any shell command. Examples:

Stackstart_commandstart_port
---------------------------------
Next.jsnpm run dev3000
Vite / Reactnpm run dev5173
Djangopython manage.py runserver 0.0.0.0:80008000
Flaskflask run --port 50005000
Railsbin/rails server -p 30003000
Gogo run . -addr :80808080
Rust (Actix/Axum)cargo run8080
Docker Composedocker compose up3000
Static filespython3 -m http.server 80808080
Already running(omit field)

Step Actions

ActionValueDescription
----------------------------
goto"/path" or full URLNavigate to a page
clickPlaywright selectorClick an element (text=Submit, #btn, .class)
fill{selector, value}Clear and fill an input field
type{selector, text}Type into an element keystroke by keystroke
waitmillisecondsPause (let animations/data load)
screenshot"name"Save screenshots/.png
scroll"down" or "up"Scroll 500px in direction
assert_visiblePlaywright selectorFail the proof if element isn't visible
assert_urlstringFail if current URL doesn't contain string

API-Only Proof (No Browser)

For backend/API changes with no UI, use api-proof.js:

node scripts/api-proof.js --spec api-spec.yaml --output ./proof-artifacts
proof:
  start_command: "npm start"
  start_port: 3000
  base_url: "http://localhost:3000"
  requests:
    - method: GET
      path: /api/health
      assert_status: 200
      assert_body_contains: "ok"
    - method: POST
      path: /api/users
      headers:
        Content-Type: application/json
      body: '{"name": "test"}'
      assert_status: 201

Produces api-proof.md and api-results.json instead of video.

Integration with Coding Agents

Append to any coding task prompt:

After completing the implementation, create a proof-spec.yaml that:
1. Starts the app with the appropriate command for this project
2. Navigates to the relevant pages
3. Demonstrates the feature with clicks/fills as needed
4. Asserts the expected outcome is visible
5. Takes before/after screenshots

Then run:
  node <skill-path>/scripts/record-proof.js --spec proof-spec.yaml --output ./proof-artifacts

Commit proof-artifacts/ with your changes.

The agent writes the proof spec based on what it built, runs it, and the video becomes part of the deliverable.

Spec Reference

See references/proof-spec.md for the full YAML schema, API proof schema, and a copy-paste PRD template.

Tips

  • Use assert_visible to make proofs fail when the feature doesn't work — video of a broken page isn't useful proof
  • Keep specs focused on the specific feature, not the whole app
  • wait steps between actions let data load and animations settle — 1-2s is usually enough
  • The video captures real load times — doubles as a basic performance check
  • If ffmpeg isn't available, the script still produces .webm (just skips mp4 conversion)

版本历史

共 1 个版本

  • v1.0.2 当前
    2026-03-29 22:02 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 857 📥 199,353
content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 295 📥 136,421
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,136