Design checks
Compare the live page with your design image.
ui-vs-design takes a screenshot at the design's size and compares it with the reference, overall and per component. The run fails at medium severity, so drift shows up in review before it ships.
ui-vs-designWhat you get
- Overall mismatch percentage
- Which components differ
- Screenshots on every run
- JSON for your agent
Step by step
From an API key to a report, then onto every pull request.
- 1
Connect WebAgent
Create an API key in the dashboard, then export it for the
webagentCLI, or add the MCP server to Claude Code so your agent can callrun_skillitself.shexport WEBAGENT_API_URL=https://api.example.com WEBAGENT_API_KEY=… # or hand the browser to Claude Code claude mcp add webagent -e WEBAGENT_API_URL=$WEBAGENT_API_URL -e WEBAGENT_API_KEY=$WEBAGENT_API_KEY -- npx -y @webagent/mcp - 2
Export the reference
Export the design frame as a PNG at the viewport size you will test, and pass it as a data URI or base64.
- 3
Choose components and a threshold
List the components that matter by accessible name.
thresholdis the share of pixels that may differ and still pass;ignoremasks regions such as a rotating banner.json{ "url": "https://staging.example.com", "reference": "data:image/png;base64,…", "threshold": 0.01, "components": [{ "name": "Sign in", "role": "button" }], "ignore": [{ "x": 0, "y": 0, "width": 300, "height": 40 }] } - 4
Run it from your own code
Every skill is also one HTTP call. The response has the status, a summary, findings by severity and a link to the HTML report.
shcurl -s -X POST $WEBAGENT_API_URL/v1/skills/ui-vs-design/run \ -H "authorization: Bearer $WEBAGENT_API_KEY" -H 'content-type: application/json' \ -d '{"inputs":{"url":"https://staging.example.com","reference":"data:image/png;base64,…"}}' # { "status": "failed", "summary": "…", "findings": [...], "reportUrl": "/v1/skill-runs/run_…/report" } - 5
Read the report
The run finishes with a summary line and findings grouped by severity, each with its evidence. Open the HTML report to share one page instead of a pile of screenshots.
Inputs
For ui-vs-design. Pass them as flags, JSON or in plain words to your agent.
| url | Page to render (required). |
|---|---|
| reference | Reference PNG as a data URI or base64 (required). |
| threshold | Max share of differing pixels that still passes, overall and per component (default 0.01). |
| components | Components to diff one by one, by accessible name, e.g. [{ "name": "Sign in", "role": "button" }]. |
| ignore | Regions to ignore, such as a carousel or a timestamp. |
| width / height | Viewport to match the design (default 1280 × 720). |
Related
Run your first check today.
Free plan: 20 credits, given once, no card.