Show HN:ProofShot – 为 AI 编码代理提供视觉能力,以验证它们构建的 UI
Show HN: ProofShot – Give AI coding agents eyes to verify the UI they build

原始链接: https://github.com/AmElmo/proofshot

## ProofShot:AI 编码代理的可视化验证 ProofShot 是一款开源 CLI 工具,旨在赋予 AI 编码代理*验证*其工作成果的能力,而不仅仅是*创建*。它解决了代理构建 UI 时,无法确认功能或视觉正确性的难题。 ProofShot 可以与任何能够运行 shell 命令的代理(Claude、Copilot、Gemini 等)配合使用,通过录制代理与真实浏览器交互的视频、捕获截图以及记录错误,来创建全面的“证明”包供人工审查。 **主要特性:** * **代理无关性:** 可与任何 AI 编码代理集成。 * **自动化工作流程:** 简单的 `start`、`test`(由代理驱动)和 `stop` 命令。 * **详细的工件:** 生成视频录制、截图、错误报告和摘要 markdown 文件。 * **GitHub 集成:** 可以自动将验证结果上传为 GitHub PR 上的评论。 * **错误检测:** 自动检测 10 种以上语言的服务器日志中的错误。 安装简单,使用 `npm install -g proofshot`,然后使用 `proofshot install` 为您的代理配置技能。它是一种避免厂商锁定,并能增强对 AI 生成代码信任度的解决方案。

## ProofShot:为AI代理提供“视觉”以进行UI开发 ProofShot 是一款新的开源CLI工具,旨在帮助AI编码代理验证其构建的UI。它认识到代理可以在不*看到*浏览器中的结果的情况下编写代码,因此ProofShot允许代理打开浏览器,与页面交互,记录过程(视频、截图、日志),并将其打包成可共享的HTML文件以供审查。 它通过shell命令与任何代理(Claude、Cursor等)配合使用,并利用Vercel Labs的agent-browser来实现速度和效率。重要的是,它*不是*一个测试框架——它不会通过/失败,而是为开发者提供视觉证据。 讨论强调了现有的工具,如Playwright和Chrome DevTools,但ProofShot提供了一个简化的无头解决方案,专注于提供快速的视觉反馈。用户对其自动化UI验证的潜力感到兴奋,尤其是在复杂任务和移动应用开发方面,以及减少手动QA工作量。一些评论员指出,类似的功能正在AI平台(如Claude和Antigravity)中出现,但他们赞赏ProofShot的开源和独立性。 [https://proofshot.argil.io/](https://proofshot.argil.io/)
相关文章

原文

ProofShot — Visual verification for AI coding agents

npm version license downloads

Open-source, agent-agnostic CLI that gives AI coding agents eyes.
Your agent builds a feature — ProofShot records video proof it works.

Works with Claude Code · Cursor · Codex · Gemini CLI · Windsurf · GitHub Copilot · any agent that runs shell commands


AI coding agents build UI features blind. They write code but can't verify the result looks right, works correctly, or throws no errors.

ProofShot closes the loop: an open-source CLI that plugs into any AI coding agent and gives it a verification workflow — test in a real browser, record video proof, collect errors, and bundle everything for the human to review.

The human gets a video recording, screenshots of key moments, and a report of any console or server errors found. View artifacts locally, or run proofshot pr to upload everything to the GitHub PR as an inline comment. No vendor lock-in. No cloud dependency.

ProofShot Viewer — video playback with interactive timeline
The interactive viewer: video recording with scrub bar, action markers, and step-by-step timeline

npm install -g proofshot
proofshot install

The first command installs the CLI and agent-browser (with headless Chromium). The second detects your AI coding tools and installs the ProofShot skill at user level — works across all your projects automatically.

Three-step workflow: start, test, stop.

# 1. Start — open browser, begin recording, capture server logs
proofshot start --run "npm run dev" --port 3000 --description "Login form verification"

# 2. Test — the AI agent drives the browser
agent-browser snapshot -i                                    # See interactive elements
agent-browser open http://localhost:3000/login               # Navigate
agent-browser fill @e2 "[email protected]"                    # Fill form
agent-browser click @e5                                      # Click submit
agent-browser screenshot ./proofshot-artifacts/step-login.png # Capture proof

# 3. Stop — bundle video + screenshots + errors into proof artifacts
proofshot stop

The skill file teaches the agent this workflow automatically. The user just says "verify this with proofshot" and the agent handles the rest.

Each session produces a timestamped folder in ./proofshot-artifacts/:

File Description
session.webm Video recording of the entire session
viewer.html Standalone interactive viewer with scrub bar, timeline, and Console/Server log tabs
SUMMARY.md Markdown report with errors, screenshots, and video
step-*.png Screenshots captured at key moments
session-log.json Action timeline with timestamps and element data
server.log Dev server stdout/stderr (when using --run)
console-output.log Browser console output

ProofShot artifacts folder
Generated artifacts for a single verification session

The viewer also includes tabs for browsing console and server logs, with error highlighting and timestamps synced to the video:

ProofShot Viewer — console logs tab
Console logs tab with error highlighting and video-synced timestamps

Detect AI coding tools on your machine and install the ProofShot skill. Run once per machine.

proofshot install               # Interactive tool selection
proofshot install --only claude  # Only install for specific tools
proofshot install --skip cursor  # Skip specific tools
proofshot install --force        # Overwrite existing installations

Start a verification session: browser, recording, error capture.

proofshot start                                        # Server already running
proofshot start --run "npm run dev" --port 3000         # Start and capture server
proofshot start --description "Verify checkout flow"    # Add description to report
proofshot start --url http://localhost:3000/login       # Open specific URL
proofshot start --headed                                # Show browser (debugging)
proofshot start --force                                 # Override a stale session from a previous crash

Stop recording, collect errors, generate proof artifacts.

proofshot stop              # Stop session and close browser
proofshot stop --no-close   # Stop but keep browser open

Pass-through to agent-browser with automatic session logging. Captures timestamps, element data, and resolves screenshot paths.

proofshot exec click @e3
proofshot exec screenshot step-checkout.png

Compare current screenshots against a baseline for visual regression.

proofshot diff --baseline ./previous-artifacts

Upload session artifacts to GitHub and post a verification comment on the PR. Finds all sessions recorded on the current branch, uploads screenshots and video, and posts a formatted comment with inline media.

proofshot pr              # Auto-detect PR from current branch
proofshot pr 42           # Target a specific PR
proofshot pr --dry-run    # Preview the markdown without posting

Requires the GitHub CLI (gh) to be installed and authenticated. Converts .webm video to .mp4 if ffmpeg is available.

Remove the ./proofshot-artifacts/ directory.

proofshot install detects and configures skills for:

Agent Install location
Claude Code ~/.claude/skills/proofshot/SKILL.md
Cursor ~/.cursor/rules/proofshot.mdc
Codex (OpenAI) ~/.codex/skills/proofshot/SKILL.md
Gemini CLI Appends to ~/.gemini/GEMINI.md
Windsurf Appends to ~/.codeium/windsurf/memories/global_rules.md

All skills install at user level — no per-project configuration needed.

The repo includes sample apps so you can see ProofShot in action without your own project.

git clone https://github.com/AmElmo/proofshot.git
cd proofshot
npm install && npm run build && npm link

# Set up the sample app
cd test/fixtures/sample-app
npm install

Open your AI agent in the test/fixtures/sample-app/ directory and prompt it:

Verify the sample app with proofshot. Start on the homepage, check the hero section, navigate to the Dashboard and check the metrics, then go to Settings and update the profile name. Screenshot each page.

Or run the automated test script without an agent:

Check proofshot-artifacts/ for the video, screenshots, and report.

ProofShot automatically detects errors from server logs across 10+ languages: JavaScript/Node.js, Python, Ruby/Rails, Go, Java/Kotlin, Rust, PHP, C#/.NET, Elixir/Phoenix, and more. Add patterns for new languages in src/utils/error-patterns.ts.

  • Architecture — How ProofShot works under the hood, why agent-browser was chosen, the session lifecycle, viewer internals, and design decisions.
  • Test Apps — Three sample apps with ready-to-use prompts for testing ProofShot end-to-end across different UI patterns (SaaS dashboard, kanban board, chat interface).

Contributions welcome! The project uses TypeScript (ESM-only) with tsup for builds and vitest for tests.

npm install
npm run build    # Build (required after changes)
npm test         # Run tests
npm run dev      # Watch mode

Three sample apps in test/fixtures/ cover different UI patterns for end-to-end testing: a SaaS dashboard (sample-app), a kanban board (todo-app), and a chat interface (chat-app).

Built on agent-browser by Vercel.

MIT

联系我们 contact @ memedata.com