Loupe
Loupe is a Claude Code plugin that helps coding agents build interfaces without the defects people keep sending back: text that overflows its box, focus that gets lost when a dialog closes, contrast that fails in dark mode, errors that blame the person, numbers that sort as strings. It carries a catalog of 263 known UI defects across 25 areas. Each one comes with why it fails, the fix, and one check with an exact pass condition.
Install
claude plugin marketplace add stevekinney/loupe
claude plugin install loupe@loupe
What's in it
The ui-rules skill loads while an agent writes or edits interface code, styles, or copy. It reads the project's overrides, then only the reference cards for the areas the change touches, so a form change reads the cards for forms, form mechanics, and microcopy instead of all 25.
Every rule's check is labeled by how it runs:
- Source pattern: a search over the changed files.
- Rendered measurement: values read from the page in a real browser, such as
scrollWidth or computed styles.
- Accessibility engine: a named axe-core rule.
- Scripted interaction: keyboard, pointer, network, or clock driven through Playwright, then asserted.
- Human judgment: a yes-or-no question a reviewer answers from the rendered screen.
The agent reports each rule it touched as passed, failed, or not verified, by rule ID. A check that couldn't run is reported as not verified, never as passed.
The ui-probe skill runs only when you name it (/loupe:ui-probe). It loads a page in a headless browser and runs the 212 rules whose checks are rendered measurements or scripted interactions, using the Playwright installed in your project. It exits 0 when nothing failed and everything ran, 1 when a rule failed, and 2 when it couldn't run or some rules were not verified.
node "${CLAUDE_PLUGIN_ROOT}/scripts/ui-probe.mjs" --url http://localhost:3000 --category forms,focus
The ui-verify skill loads when an agent is about to report interface work as done, ready for review, or fixed, and when a person says a screen looks wrong. Its script, ui-verify.mjs, does the following:
- It screenshots each changed page and state, at 375 and 1280 px by default or the full 320 to 1920 px ladder in light and dark on request, and runs the chosen probes.
- It records the commit, the environment, and which checkout is serving the page.
- It searches the diff for checks that were skipped or silenced.
The agent then writes a cold verdict for each capture before opening any design or reference. ui-verify check exits 0 only when every capture loaded, rendered something, and was judged ok, and nothing failed. Its report always ends with what was not verified. Records go to .loupe/verify/ in the project, so add .loupe/ to your .gitignore.
The ui-reviewer agent (loupe:ui-reviewer) reviews captured work in a fresh context and can only read files. It does the following:
- It confirms the captures are usable.
- It judges each one cold before looking at references.
- It gives each design row a status.
- It returns one ranked findings table, with an evidence class per finding (measured, rendered, source-only, or judgment), and a disposition derived from the findings: recapture, rebuild, fix, or ship.
How far the reviewer is calibrated
The bars are recall of at least 0.90 on planted judgment defects and zero false alarms on fixed controls, scored on 20 judgment rules the prompt was never tuned on.
- Claude, before tuning: the shipped Sonnet agent with a Haiku judge scored recall 0.60 with zero false alarms on those 20 (
calibration/ui-reviewer.json). Read by hand, the misses were one the judge undercounted, two that a still can't show, and the rest real: unlabelled icon buttons, a spinner with no context, a cropped face, mixed icon sets and a scroller with no scroll cue.
- After tuning, scored with Codex: the tuned prompt, with Codex as reviewer and judge, scored recall 0.90 (18 of 20) with zero false alarms (
calibration/ui-reviewer.codex.json). It missed UI-122 (the on-screen keyboard covers the field, which a still can't show) and UI-230 (a scroller with no sign it scrolls). Twelve of the 20 fixed controls drew some other HIGH or MEDIUM finding, so expect findings beyond the planted defect.