Skip to main content
ClaudeWave
Skill80.6k repo starsupdated today

verify

>

Install in Claude Code
Copy
git clone --depth 1 https://github.com/lobehub/lobehub /tmp/verify && cp -r /tmp/verify/packages/builtin-skills/src/verify ~/.claude/skills/verify
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Verify (Builder Self-Evidence)

You are the **builder** for a task. A separate review step will judge your
delivery against a **verify plan** — a list of criteria, some of which demand
**evidence** (a screenshot, a DOM snapshot, CLI output…). A criterion that
declares `requiredEvidence` **cannot pass on your text alone**: if the artifact
is missing, the structural gate marks it `uncertain` and the delivery is held.

So while you do the work, capture the proof and submit it. The loop:

```
discover plan  →  pick the surface  →  capture evidence per criterion  →  submit each  →  self-check coverage
```

Everything here is portable: the hard dependencies are the `lh` CLI (already
authed in your environment) and, for UI proof, `agent-browser`. No repo scripts,
no local report directory.

## Prerequisites

- **`lh` is authed.** Confirm with `lh verify run list --json` (an empty `[]`
  means authed; an auth error means stop and surface it).
- **You know your operation id.** It is provided as `$LOBE_OPERATION_ID` in the
  environment (or named in your task prompt). Every command below keys off it.
  If it is unset, there is no plan to satisfy — skip this skill.
- **For UI evidence, `agent-browser` is installed.** `npm i -g agent-browser`
  then `agent-browser install` (downloads Chrome). Full reference:
  [references/agent-browser.md](references/agent-browser.md).

## Step 1 — Discover the plan (what to prove)

One read tells you what to prove:

```bash
lh verify plan state "$LOBE_OPERATION_ID" --json
```

Each `verifyPlan[]` item carries `id` (the **checkItemId**), `title`, `required`,
and `verifierConfig.requiredEvidence` (`[{ type, hint }]` — the artifacts you MUST
capture). The `checkItemId` is the only handle you need: `lh verify submit` (Step 3)
keys off it plus your operation id and creates the result row for you, so you do
**not** need a `checkResultId` up front. (Result rows generally don't exist yet at
this point — that's expected.) Exact shapes:
[references/plan-format.md](references/plan-format.md).

> Only items with a non-empty `requiredEvidence` need an artifact. Items without
> it are judged on the deliverable text alone — don't fabricate evidence.

## Step 2 — Pick the surface by what you changed

The criterion's `hint` usually implies the surface. Match the change you made to
the cheapest surface that can actually prove it, and escalate only if needed:

| What your task changed                                         | Surface                                                  | Why                                                                        | Guide                                             |
| -------------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------- |
| Backend / CLI / library / data logic                           | **CLI** 端                                               | Fastest, text-assertable, zero UI flakiness — upload stdout as `text`      | [surfaces/cli.md](surfaces/cli.md)                |
| Web app frontend / styles / interactions                       | **Web** 端 (agent-browser → running web app)             | The product shape users see; screenshot/DOM the rendered result            | [surfaces/web.md](surfaces/web.md)                |
| New/changed API **plus** the UI consuming it                   | **Web** 端,full-stack (agent-browser + network capture) | One surface where request/response and rendered result are both observable | [surfaces/web.md](surfaces/web.md#web-full-stack) |
| Desktop (Electron) app behavior                                | **Electron** 端 (agent-browser `--cdp`)                  | Only the real desktop shell exercises desktop-only code paths              | [surfaces/electron.md](surfaces/electron.md)      |
| Native macOS app / OS-level behavior agent-browser can't reach | **Native** 端 (Computer Use: osascript + screencapture)  | The only way to drive non-Chromium apps and OS chrome (local macOS only)   | [surfaces/native.md](surfaces/native.md)          |

Rules of thumb:

- **Don't open a browser for a backend change.** If a criterion is satisfied by a
  command's output or a test passing, capture that as `text` — it's the strongest,
  cheapest proof.
- **Web vs Electron:** use **web** when the behavior is identical in a normal
  browser against the app's dev server or deployed URL. Use **Electron** only when
  the criterion depends on desktop-only behavior (native windows, IPC, the
  packaged shell, OS integration) — that code path doesn't exist in a plain web
  page. Switching conditions per 端: [surfaces/web.md](surfaces/web.md) and
  [surfaces/electron.md](surfaces/electron.md).
- **Auth is a gate, scoped to the 端.** If the state under test is behind a
  login, authenticate that 端 first or every capture lands on the sign-in
  page. Recipes and boundaries: [references/auth.md](references/auth.md).

## Step 3 — Capture, then submit each artifact

Capture each required `type` (recipes per surface in
[references/evidence.md](references/evidence.md)), then submit one artifact per
call with the criterion's `checkItemId`. `lh verify submit` resolves your session
from the operation id, lazily creates/updates the result row, and attaches the
evidence — one call, no `checkResultId` needed:

```bash
# CHECK_ITEM_ID is the plan item id for this criterion (from Step 1).
# file artifact (screenshot / dom / video)
lh verify submit --operation "$LOBE_OPERATION_ID" --item "$CHECK_ITEM_ID" \
  --type screenshot --file ./proof/login.png --by agent-browser \
  --desc "Logged-in home renders the workspace switcher"

# inline text artifact (stdout / computed value) — no file
lh verify submit --operation "$LOBE_OPERATION_ID" --item "$CHECK_ITEM_ID" \
  --type text --content "$(your-cli command --json)" --by cli \
  --desc "command reports success aft