Skip to content
Solutions · by use case

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.

Skills:ui-vs-design

What 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. 1

    Connect WebAgent

    Create an API key in the dashboard, then export it for the webagent CLI, or add the MCP server to Claude Code so your agent can call run_skill itself.

    sh
    export 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. 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. 3

    Choose components and a threshold

    List the components that matter by accessible name. threshold is the share of pixels that may differ and still pass; ignore masks 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. 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.

    sh
    curl -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. 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.

urlPage to render (required).
referenceReference PNG as a data URI or base64 (required).
thresholdMax share of differing pixels that still passes, overall and per component (default 0.01).
componentsComponents to diff one by one, by accessible name, e.g. [{ "name": "Sign in", "role": "button" }].
ignoreRegions to ignore, such as a carousel or a timestamp.
width / heightViewport to match the design (default 1280 × 720).

Run your first check today.

Free plan: 20 credits, given once, no card.