An AI coding agent can edit files, run commands, and open a PR — but a diff and a green test suite don't tell you whether the change actually works in a browser. npx screencli verify closes that gap: after the agent makes a change, it points screencli at the running app, names the behavior that must hold, and gets back a pass / fail / inconclusive verdict plus a recording — the same result the GitHub App posts on a PR, but in the agent's loop before the PR exists. On a fail the agent has concrete evidence to fix the change and try again.
Any agent that can run a shell command — Claude Code, Cursor, Cline, Windsurf, or your own script — can call it. It's a standard CLI tool; there's nothing agent-specific in the command.
Prerequisites
- A running URL to test.
verifydrives a real browser against a URL, so the app must be reachable — your local dev server (http://localhost:3000), a preview deployment, or a staging URL. npx(Node). No install and no account are needed for the first run —npx screenclifetches the CLI on demand.- (Optional) A screencli account to tie recordings to your dashboard and share them — sign in with
npx screencli login(see CLI login & API access).
The inner loop
The pattern is the same for every agent — only how you tell the agent to run the command differs:
-
The agent makes a change — fixes a bug, adds a feature, edits config.
-
It starts (or reuses) a running app — a local dev server or a preview URL.
-
It runs
verifywith the behavior as the assertion:npx screencli verify http://localhost:3000 \ -p "Add an item to the cart, go to checkout, complete the purchase, confirm the order ID renders" -
It reads the verdict.
pass→ the flow works; move on.fail→ the reason and recording show exactly what broke, so the agent fixes it and re-runs.inconclusive→ the assertion was too vague or the app was unreachable; sharpen the prompt or check the URL. -
It opens the PR once
verifypasses. If you also run the GitHub App, the PR is verified again automatically against its preview deployment — so the same check gates the change locally and on the PR.
verify runs the same browser engine as record and takes the same <url> -p "<prompt>" shape; the difference is intent — verify is for catching a broken flow in the loop. The -p prompt is the assertion, so name a concrete, observable outcome — a vague prompt comes back inconclusive. See Writing effective prompts for how to phrase it.
Set it up for Claude Code
Install the screencli skill so Claude Code can drive a browser and verify its own work as part of your workflow:
npx skills add usefulagents/screencli --skill screencli
Then, after Claude Code makes a change, ask it to verify — it runs the CLI, reads the verdict, and self-corrects on a failure:
Verify the fix works: start the dev server, then run screencli verify against the checkout flow and confirm the order ID renders. If it fails, fix it and re-run until it passes.
Claude Code launches a real browser through screencli, walks the flow, and returns a shareable link at screencli.sh/v/<id> alongside the verdict — no Playwright scripts to write and no selectors to maintain.
Use it from Cursor, Cline, or Windsurf
There's no plugin to install — verify is a shell command, so any agent that can run one can call it. Give the agent a standing instruction (a Cursor/Windsurf rule, a CLAUDE.md note, or just a follow-up message) so it runs the check on its own:
After you make a UI change, run
npx screencli verify <preview-url> -p "<the behavior that must hold>". If the verdict isfailorinconclusive, read the reason, fix the change, and re-run until it passes before opening a PR.
Because the command, the flags, and the verdict format are identical across agents, the same instruction works everywhere.
Example — a full pass/fail loop
An agent has just changed the checkout button. It verifies against the local dev server:
npx screencli verify http://localhost:3000 \
-p "Click Checkout, fill the test card 4242 4242 4242 4242, submit, and confirm the success page shows an order ID"
A failing run comes back like this — the reason tells the agent exactly what to fix:
✗ fail — Checkout submitted but the success page never rendered; the button
stayed in a loading state and the console logged a 500 from /api/orders.
recording → https://screencli.sh/v/a3f2c8e1
The agent fixes the API call and re-runs; on success it gets:
✓ pass — Order ID #10428 rendered on the success page after submit.
recording → https://screencli.sh/v/b7d21f90
Now it opens the PR with a green local verdict — and the GitHub App re-verifies the same behavior on the preview deployment.
Verify an app that needs login
If the flow requires a signed-in session, add --login so you (or the agent, with a saved session) authenticate first, and --auth <name> to reuse that session on later runs:
npx screencli verify http://localhost:3000 -p "Open the billing page and confirm the current plan shows" --login --auth myapp
See Record an app that needs login for how saved sessions work. (The GitHub App handles login differently — via the repo's Authentication settings — because it runs unattended.)
Run it in CI
To gate a merge on a browser check without the GitHub App, run verify in a workflow. Sign in once locally, grab the long-lived token with npx screencli token, store it as a repository secret, and expose it to the CLI as SCREENCLI_TOKEN:
# .github/workflows/verify.yml
- name: Verify checkout against the preview
env:
SCREENCLI_TOKEN: ${{ secrets.SCREENCLI_TOKEN }}
run: npx screencli verify "$PREVIEW_URL" -p "Complete a checkout and confirm the order ID renders"
The full token + CI setup is in CLI login & API access.
Notes & limits
- First run needs no setup. No account or API key is required to
verifyand get a shareable link — sign in when you want the recording on your dashboard and shared with your team. - The prompt is the assertion. Name a concrete, observable outcome; a vague prompt returns
inconclusive, notfail. See Writing effective prompts. verifyneeds a reachable URL. Point it at a running dev server, preview, or staging URL — it can't test code that isn't deployed or served somewhere the browser can open.- Local
verifyand the GitHub App are complementary.verifyis the pre-PR check in your agent's loop; the GitHub App is the automatic check on every PR. They run the same engine and return the same verdict format, so a change that passes locally passes on the PR for the same reasons. - The CLI is MIT-licensed and standalone. It works with no GitHub App; hosted recording links and higher limits are covered by the plan.