闲社服务运行正常AI智能体自动化平台
v

视频证据

技能标识: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 that the feature works. Generates screen recordings, screenshots, and test logs as PR artifacts. Integrates with any coding agent workflow — run after code is written to produce video evidence of working software. Trigger on "video proof", "record demo", "prove it works", "show me it working", or when PRDs include a proof/demo step.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.2
检测标记
后台标记通过
免费
免费获取
1
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

视频证据

视频验证

使用 Playwright 内置屏幕录制功能录制已实现功能的视频演示。编码任务完成后,此技能会启动您的应用程序,运行脚本化演示,并捕获视频 + 截图 + 控制台日志作为验证产物。

适用于任何技术栈 — Next.js、Vite、Django、Rails、Go、Docker、静态文件或已运行的服务器。您提供启动命令,技能处理其余部分。

前置条件

每台机器运行一次:

bash
bash scripts/setup.sh

安装 Playwright(Chromium)、ffmpeg 和 yaml npm 包。

快速开始

选项 A:YAML 验证规范(推荐)

创建 proof-spec.yaml:

yaml
proof:
start_command: npm run dev # 启动应用程序的任何 shell 命令
start_port: 3000 # 开始录制前轮询的端口
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

运行它:

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

选项 B:内联 CLI(简单情况)

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

选项 C:已运行的服务器(无 start_command)

省略 start_command — 脚本跳过服务器启动,直接开始录制:

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

生成的产物

proof-artifacts/
├── video.webm # 完整屏幕录制
├── video.mp4 # 聊天友好版本(通过 ffmpeg 自动转换)
├── screenshots/ # 步骤中的命名截图
│ ├── dashboard-loaded.png
│ └── item-created.png
├── console.log # 浏览器控制台输出(错误、警告、日志)
└── proof-summary.md # Markdown 报告,包含每个步骤的通过/失败状态

退出代码:所有步骤通过为 0,任何步骤失败为 1。失败时,会自动捕获 FAILURE.png 全页截图。

启动命令示例

start_command 字段接受任何 shell 命令。示例:

技术栈startcommandstartport
Next.jsnpm run dev3000
Vite / React
npm run dev | 5173 |
| Django | python manage.py runserver 0.0.0.0:8000 | 8000 |
| Flask | flask run --port 5000 | 5000 |
| Rails | bin/rails server -p 3000 | 3000 |
| Go | go run . -addr :8080 | 8080 |
| Rust (Actix/Axum) | cargo run | 8080 |
| Docker Compose | docker compose up | 3000 |
| 静态文件 | python3 -m http.server 8080 | 8080 |
| 已运行 | (省略字段) | — |

步骤操作

操作值描述
goto/path 或完整 URL导航到页面
click
Playwright 选择器 | 点击元素(text=Submit、#btn、.class) | | fill | {selector, value} | 清空并填充输入字段 | | type | {selector, text} | 逐键输入到元素中 | | wait | 毫秒 | 暂停(让动画/数据加载) | | screenshot | name | 保存 screenshots/.png | | scroll | down 或 up | 向指定方向滚动 500px | | assert_visible | Playwright 选择器 | 如果元素不可见则验证失败 | | assert_url | 字符串 | 如果当前 URL 不包含字符串则失败 |

仅 API 验证(无浏览器)

对于没有 UI 的后端/API 更改,使用 api-proof.js:

bash
node scripts/api-proof.js --spec api-spec.yaml --output ./proof-artifacts

yaml
proof:
start_command: npm start
start_port: 3000
base_url: http://localhost:3000
requests:
- method: GET
path: /api/health
assert_status: 200
assertbodycontains: ok
- method: POST
path: /api/users
headers:
Content-Type: application/json
body: {name: test}
assert_status: 201

生成 api-proof.md 和 api-results.json 而不是视频。

与编码代理集成

附加到任何编码任务提示中:

完成实现后,创建一个 proof-spec.yaml,该文件:

  1. 1. 使用适合此项目的命令启动应用程序
  2. 导航到相关页面
  3. 根据需要点击/填充来演示功能
  4. 验证预期结果可见
  5. 拍摄前后截图

然后运行:
node /scripts/record-proof.js --spec proof-spec.yaml --output ./proof-artifacts

将 proof-artifacts/ 与您的更改一起提交。

代理根据其构建的内容编写验证规范,运行它,视频成为交付物的一部分。

规范参考

有关完整的 YAML 模式、API 验证模式和可复制粘贴的 PRD 模板,请参阅 references/proof-spec.md。

提示

  • - 使用 assert_visible 使验证在功能不起作用时失败 — 损坏页面的视频不是有用的验证
  • 保持规范专注于特定功能,而不是整个应用程序
  • 操作之间的 wait 步骤让数据加载和动画完成 — 1-2 秒通常足够
  • 视频捕获真实加载时间 — 兼作基本性能检查
  • 如果 ffmpeg 不可用,脚本仍会生成 .webm(只是跳过 mp4 转换)

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 video-proof-1776296905 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 video-proof-1776296905 技能

通过命令行安装

skillhub install video-proof-1776296905

下载

⬇ 下载 video-proof v1.0.2(免费)

文件大小: 12.14 KB | 发布时间: 2026-4-16 17:25

v1.0.2 最新 2026-4-16 17:25
Fix: re-publish with complete package files.
返回顶部