Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器clawhub未标认证来源可访问clear审计提醒

pr-proof-of-workpr 工作量证明

Agent Skill

pr-proof-of-work 用于处理浏览器自动化、网页检查和页面信息提取,适合在 OpenClaw 中需要让 Agent 打开页面、读取网页或验证前端流程时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,590

周安装

109

GitHub Stars

公开资料未说明

下载量

907
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:pr-proof-of-work(pr 工作量证明)
来源仓库:https://github.com/newtontech/pr-proof-of-work
安装命令:
openclaw skills install pr-proof-of-work
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install pr-proof-of-work

简介

使用 Playwright 浏览器截图生成 TDD 驱动的 E2E 测试证明。

  • 适合需要可视化证据验证前端功能实现的场景。pr-proof-of-work 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 在修复 bug 或新增功能时可作为 PR 附件提交。
  • 需配置浏览器环境与截图存储路径,注意临时文件清理。
  • 可能消耗较多资源,建议在低峰时段执行长时间任务。

SKILL.md

name
tdd-e2e-pr-workflow
description
>
Workflow
pick one open issue → write E2E test → implement fix → PR with screenshots.
Triggers
tdd e2e", "screenshot pr", "before after screenshot", "visual pr proof",

TDD E2E PR Workflow

One Issue → One PR with visual proof.

Flow: Select one issue → Write test (BEFORE screenshot) → Fix → Test passes (AFTER screenshot) → PR with screenshot comment.

Golden Rule: Study ≥2 existing PASSING tests before writing any new test. Wrong fixture/selector usage is #1 failure cause.


Phase 0: Select One Issue

Choose an open issue to work on, or pick randomly:

# Option A: List and manually select
gh issue list --repo <owner/repo> --state open --json number,title,body

# Option B: Pick one randomly
gh issue list --repo <owner/repo> --state open --json number,title | \
  jq -r '.[] | "\(.number): \(.title)"' | shuf -n 1
  1. Note the issue number and create a short kebab-case slug from title (e.g. "fix-discard-button")
  2. Create isolated worktree:
   git worktree add .worktrees/fix/<slug> -b fix/<slug>
   cd .worktrees/fix/<slug>
  1. Copy screenshot-reporter.ts into the worktree's e2e/ directory (not tracked on fix branches)
  2. Set screenshot output:
   export E2E_SCREENSHOT_DIR="$(pwd)/e2e-screenshots"

Phase 1: Write Real Browser Test

Step A: Study existing tests (MANDATORY)

Read ≥2 passing E2E tests to understand:

  • Fixture API (withProject, withSession, gotoSession, sdk)
  • Action helpers (waitSessionIdle, runTerminal, openSettings)
  • Selector patterns (data-component, data-slot, ARIA roles)
  • Data seeding (apply_patch, terminal commands, SDK methods)

Step B: Write test with BEFORE screenshot

import { test, expect } from "../fixtures"
import { createScreenshotReporter } from "../screenshot-reporter"

test("feature description", async ({ page, withProject }) => {
  const screenshot = createScreenshotReporter(page, "test-name")

  await withProject(async (project) => {
    // ... setup using project's fixture patterns ...
    await screenshot.captureBefore("initial-state")
    // ... assertions ...
  })
})

Playwright TS transform gotcha — rejects inline object params:

// WRONG: fs.mkdirSync(dir, { recursive: true })
// RIGHT:
const opts = { recursive: true }
fs.mkdirSync(dir, opts)

Apply to ALL object literals: fs.mkdirSync, page.screenshot, page.waitForFunction, etc.


Phase 2: Implement Fix

Write minimum code to pass. Do NOT modify test assertions.

Debugging loop (most tests need 2-4 iterations):

  1. Read error carefully — 90% are selector/fixture mismatches, not logic bugs
  2. Verify DOM — use page.waitForSelector or page.waitForFunction to confirm elements exist
  3. Check prerequisites — hover before clicking, expand before asserting, wait for idle
  4. Use page.pause() to inspect live DOM
  5. Never weaken assertions — fix the code, not the test

Common failure patterns (see references/debugging-guide.md):

SymptomLikely CauseFix
Timeout on selectorWrong data attribute or shadow DOMCheck DOM with page.pause(), try ARIA roles
waitMark never resolvesSeed function missing expected contentMatch seed format exactly from passing tests
Button not visibleMissing hover/expand stepHover parent row, expand section first
Review panel emptyWrong changes mode (git vs session)Switch mode before asserting
Stale element referenceRace condition with async updatesAdd waitSessionIdle after mutations

Phase 3: AFTER Screenshot + Hard Gate

  await expect(fixedElement).toBeVisible()
  await screenshot.captureAfter("feature-working")

Hard gate — ALL three must be true before PR:

  • Test passes (exit code 0)
  • BEFORE-*.png exists
  • AFTER-*.png exists

Phase 4: PR + Screenshot Comment

# Stage, commit, push
git add -A
git commit -m "fix: <issue-description> (closes #<issue-number>)"
git push origin fix/<slug>

# Create PR referencing the issue
gh pr create \
  --title "fix: <short-description>" \
  --body "Closes #<issue-number>

## Summary
<Brief description of the fix>

## Screenshots
| Before | After |
|--------|-------|
| ![Before](<BEFORE-screenshot-url>) | ![After](<AFTER-screenshot-url>) |

## Verification
- [x] E2E test passes
- [x] BEFORE screenshot captured
- [x] AFTER screenshot captured" \
  --repo <owner/repo>

# Push screenshots to branch for GitHub raw URLs
git add e2e-screenshots/
git commit -m "chore: add e2e screenshots"
git push origin fix/<slug>

gh pr comment has no --attach — push images to branch, use raw GitHub URLs.


Backend-Only PRs

For PRs without direct UI changes, find the closest UI-exercisable path:

Change TypeE2E StrategyReal Example
Config utilityOpen settings dialogopenSettings(page) → screenshot config panel
Python resolverRun terminal commandrunTerminal(page, {cmd: "python3 --version"}) → show output
Race conditionTrigger rapid operationsCreate file externally → click refresh → verify
State managementMulti-session switchingSelect file in session A → switch to B → back to A
Cache bypassForce refreshAdd external file → click refresh button → verify
URL parsingCheck connection statusopenStatusPopover(page) → verify connected
Focus managementVerify focus after actionOpen file → check prompt still focused

NEVER use page.setContent() — always test through the real application.


Quick Reference

# Select an issue (manual or random)
gh issue list --repo owner/repo --state open --json number,title

# Create worktree
git worktree add .worktrees/fix/ISSUE -b fix/ISSUE
cd .worktrees/fix/ISSUE

# Set screenshot dir
export E2E_SCREENSHOT_DIR="$(pwd)/e2e-screenshots"

# Run E2E test
npm run test:e2e -- <test-file>

# Push and create PR
git push origin fix/ISSUE
gh pr create --title "fix: ..." --body "Closes #N" --repo owner/repo

Constraints

  • One issue at a time — complete one PR before starting the next
  • BEFORE and AFTER must BOTH exist before PR comment — hard gate, no exceptions
  • Screenshots save to worktree via E2E_SCREENSHOT_DIR, never to main repo
  • Always study ≥2 passing tests first — this is the #1 rule
  • NEVER use page.setContent() — real app only
  • Playwright TS transform rejects inline object params — always extract to variable
  • screenshot-reporter.ts must be copied to each worktree's e2e/ (not on fix branches)
  • Test MUST pass before PR — never create PR with failing tests

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

83.27%
按下载量换算755

安全审计

VirusTotal

未展示

ClawScan

可疑

Static analysis

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills