/agentex:ui-checkfrom AgenTeX
Compares a live browser page against a Figma frame or screenshot baseline in test specs. Supports exact (every detail) or reference (enumerated details only) modes. Baselines are resolved by a bundled runner; unresolvable baselines block the check.
Ships in AgenTeX. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
You judge whether the live page open in the browser matches a declared design baseline (a Figma frame or a screenshot). Fetching and validating the baseline is the bundled runner's job; the visual verdict is yours, and no pixel-diff threshold makes it for you.
Lets a scenario assert "this screen matches the approved design" as an executed, evidenced step. Mechanics live in the bundled runner (Figma access, image validation, the BLOCKED gate); the verdict is yours — a vision comparison under the protocol below. No pixel-diff threshold decides anything, ever.
ui-check: figma <node-id | frame URL> — mode: exact|reference [ — viewport: desktop|tablet|mobile|<W>x<H> ]
ui-check: image <path> — mode: exact|reference [ — viewport: ... ]
reference-mode enumerated details are the sub-bullets under the step (or explicitly
referenced adjacent spec text):
ui-check: figma 123:456 — mode: reference
- must: primary CTA reads "Pay now" and is enabled
- must: order summary shows 3 line items with a total row
Both bare node-ids (123:456, URL-style 123-456) and full Figma frame URLs are valid
identifiers. The comparison target is always the page as the scenario left it at the
point the step appears — no extra navigation.
node ${CLAUDE_PLUGIN_ROOT}/skills/ui-check/scripts/fetch_baseline.js \
--source figma --id <node-id | frame URL> \
--out <SESSION_DIR>/screenshots/<scenario>-ui-check-baseline.png \
--log <SESSION_DIR>/logs/<scenario>-ui-check.log [--scale 2] \
[--no-cache] [--cache-dir <dir>] [--cache-max-age-days <n>]
node ${CLAUDE_PLUGIN_ROOT}/skills/ui-check/scripts/fetch_baseline.js \
--source image --path <baseline image> --out ... --log ...
It prints one JSON line:
{"result":"OK|BLOCKED","baseline":…,"width":…,"height":…,"node":{…},"variants":[…],"cached":…,"cachedAt":…,"fileKeyMismatch":…,"reason":…}
(exit 0 OK / 2 BLOCKED). Figma config comes from config/project.json's figma block —
a story carries only the frame identifier.
fileKeyMismatch: true (frame URL names a different file than the configured
figma.fileKey) → raise it with the user; the differing URL is never silently used.cached: true → Figma was unreachable (reason names how: a rate limit, a 5xx, a
dead download) and the runner fell back to the baseline it cached at cachedAt. A
parallel run is two Figma calls per ui-check step, so 19 steps earn a 429 from a design
that has not moved in weeks — the check is worth running, but the caveat is not optional:
reason verbatim into the step report, cache date included;cachedAt, which is not the same claim as matching the live design;<cachedAt>, so nobody files a design defect that is really a design change.
Re-run the check once Figma answers before that bug is confirmed.
The runner will not fall back past 7 days (--cache-max-age-days), and never falls back
on a rejected token or an unknown node — those stay BLOCKED, because a config error that
quietly resolves itself from cache is a config error nobody ever fixes. --no-cache
turns the fallback off entirely.If variants lists multiple candidate frames (component set / section / page):
--id and proceed.Infer the baseline's form factor from its frame dimensions + name; the run's target from
the step's viewport: (or the current browser viewport when undeclared). Width bands and
name cues are in references/figma-api.md. Different classes (mobile vs desktop etc.)
→ the check ends as a named "view mismatch error" — e.g. "baseline is mobile 390×844;
run targets desktop 1440×900" — and no PASS/FAIL verdict is issued.
"viewports" block in the consumer's
config/project.json (e.g. {"mobile": "414x896"} — read if present). An explicit
<W>x<H> in the step is used verbatim.resize <w> <h> (run-code page.setViewportSize({width, height}) only where
--help resize shows no such command), then capture:
screenshot --filename=<SESSION_DIR>/screenshots/<scenario>-ui-check-actual.png.Read the baseline image, then the actual. Work element by element — enumeration beats gestalt glancing.
exact mode: enumerate every visible element of the baseline (presence, content,
position, size, color, typography); verify each in the actual; then sweep the actual
for extra elements the baseline lacks.
reference mode: PASS/FAIL is decided only by the enumerated details.
Write into the scenario's report entry: the verdict, mode, baseline identity (node id +
name, or image path), and both image paths (*-ui-check-baseline.png /
*-ui-check-actual.png — they live in the session's evidence slice like every
screenshot). A FAIL becomes a standard defect in the run's bug list — Title / Steps
to reproduce / Expected = the baseline / Actual = the implemented page / Severity /
Evidence = both images — filable through the bug-report-azure flow unchanged.
report.md uses these names verbatim; extent-report.html carries the two new statuses
first-class:
| Outcome | Meaning | extent-report status |
|---|---|---|
| PASS | conforms per the mode | passed |
| PASS + warning | reference-mode layout drift, unconfident variant pick, or a cached (not live) baseline | warning (summary count warnings) |
| FAIL | clear deviation (exact) / violated enumerated detail (reference) | failed |
| VIEW MISMATCH ERROR | form factors differ; no PASS/FAIL | viewMismatch (note names the mismatch) |
| BLOCKED | unresolvable baseline (script's named reason, verbatim) | blocked |
| NEEDS-USER (parallel interim only) | pending noise-confirmation or variant question | never appears in a final report — resolved at MERGE |
// config/project.json
"figma": { "fileKey": "<your file key>", "token": { "envSecret": "FIGMA_TOKEN" } }
FIGMA_TOKEN holds the personal access token in .env. Screenshot baselines
(--source image) need no Figma configuration at all; keep them anywhere in the
project (conventionally test/baselines/).
Secret rule: the Figma token is only ever an env-var name in config; the runner sends it as a header. The value never appears in logs, reports, JSON output, or on a command line.
Vision comparison can miss very subtle deviations (1–2px shifts, near-identical hues). "No silent tolerance" means no numeric threshold is ever applied — it does not repeal perception limits. The element-by-element protocol above is the mitigation; disclose residual uncertainty in the report note rather than overclaiming.
${CLAUDE_PLUGIN_ROOT}/skills/ui-check/references/figma-api.md — Figma endpoints and
auth, node-id formats, render parameters and the short-lived-URL rule, variant traversal
caveats, form-factor inference bands, named-viewport defaults, troubleshooting. Read it
before the first Figma-sourced check in a session and whenever the runner behaves
unexpectedly.
What SKILL.md sets; muted values are Claude Code's defaults
17 skills in this plugin
/api-integrationExecute user-defined API calls during test runs, from the project's integration/ catalog. Use whenever a test step needs an HTTP call: verify via API that a UI action persisted, check an endpoint's response, or seed test data through a service. Triggers on spec steps starting with "api:", or requests like "verify via API", "call the endpoint", "check the response". The agent executes ONLY requests the user has defined in a *_api.json catalog (searched recursively under integration/) — it never composes its own HTTP requests.
/ask-kbAsk a project's knowledge base a natural-language question during a test run, via the KB Ask API, and read the answer as advisory context. Triggers on spec steps starting with "kb:", or requests like "ask the KB", "what does the knowledge base say", "how does <flow> work". Explicit only — the agent never calls the KB on its own initiative. Answers inform testing/navigation but are NEVER used as PASS/FAIL evidence.
/azure-integrationagentex@elgazzar-plugins is listed by mhmdelgazzar/elgazzar-plugins — review the source before installing
npx claudepluginhub mhmdelgazzar/elgazzar-plugins --plugin agentexOther plugins' skills for the same job