measure-ui
Skill3 starsChanged 50 days agoMITView on GitHub
Prove UI fidelity and interaction behaviour by measuring computed styles, rects and hit tests in a live browser instead of trusting screenshots. Use when matching a build against its design reference, when debugging layout, overflow, dropdown, animation or Tailwind-variant bugs, before claiming a hover, focus, overlay, drawer or animation change works, or when a migration or reimplementation must stay pixel-identical to a baseline.
In this repository191 other files it gives its agents.
- skills/engineering/vercel-composition-patterns/AGENTS.mdAGENTS.md
- skills/engineering/vercel-optimize/AGENTS.mdAGENTS.md
- skills/engineering/vercel-react-best-practices/AGENTS.mdAGENTS.md
- skills/engineering/vercel-react-native-skills/AGENTS.mdAGENTS.md
- skills/engineering/vercel-react-view-transitions/AGENTS.mdAGENTS.md
- skills/productivity/humanizer/AGENTS.mdAGENTS.md
- promoteSkill
- upstream-reviewSkill
- animate-expoSkill
- animateSkill
- animation-performanceSkill
- animation-vocabularySkill
- apple-designSkill
- ask-sonnerSkill
- break-uiSkill
- design-referencesSkill
- emil-design-engSkill
- find-animation-opportunitiesSkill
- improve-animationsSkill
- logo-surface-boardSkill
- mobile-nativeSkill
- pen-devSkill
- pick-ui-librarySkill
- redesign-inventorySkill
- refactoring-uiSkill
- review-animationsSkill
- svg-animationsSkill
- web-design-guidelinesSkill
- agent-sourcesSkill
- anti-slop-migrationSkill
- architectSkill
- arenaSkill
- ask-anisSkill
- automate-meSkill
- autonomous-runSkill
- avoid-feature-creepSkill
- babysitSkill
- benchmark-checklistSkill
- blast-radiusSkill
- bun-monorepoSkill
- codebase-designSkill
- code-reviewSkill
- control-cliSkill
- control-uiSkill
- correctSkill
- create-verification-skillSkill
- dependabot-backlogSkill
- deploy-to-vercelSkill
- deslopSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- drizzle-postgresSkill
- effect-tsSkill
- effect-v4Skill
- estimateSkill
- evalSkill
- git-split-amended-followupSkill
- grill-with-docsSkill
- howSkill
- implementSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
A driver: only runs the browser: call the Skill tool with "control-ui" for a local browser or Electron app, or "orca" inside the Orca IDE.
- Very specific: line 32
Click by pixel: Prefer trusted pixel clicks (page.mouse.click(x, y)) over clicking a visually hidden input by its accessibility ref.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Measure UI
Screenshots produce confident wrong conclusions, both false passes and false failures. Every claim about layout, fidelity, hover, focus, overflow or animation rests on a measurement: computed styles, rects and hit tests read in a live browser, asserted as numbers.
Pick the branch
- Fidelity: you have a design reference (a mockup, a design file, or your own earlier build) and an implementation, and need to prove they match or find why they differ.
- Interaction states: a dropdown, overlay, drawer or CSS animation looks broken, or you are about to claim an interactive change works.
- Visual parity: a styling-system migration or a reimplementation must not move a pixel; a frozen screenshot baseline and a zero image diff decide.
Matching a design usually needs both: fidelity for the static layout, then interaction states for every menu and animation.
Who does what
Proving a UI claim takes three skills, each owning one part:
- verify-this frames the claim and gives the verdict (VERIFIED, NOT VERIFIED or INCONCLUSIVE).
- This skill sets the evidence rules for anything visual or interactive: what to measure, how to actuate, what counts as proof.
- A driver only runs the browser: call the Skill tool with "control-ui" for a local browser or Electron app, or "orca" inside the Orca IDE.
Drivers locate elements by role, label or a stable data-* selector, then exercise them with real input at the element's measured position, then hit-test. A DOM element.click() through evaluate is fine for setting up state, never as the proof that a user can click it.
Rules for every measurement
- Actuate for real. Move the mouse with real pointer events (
page.mouse.move(x, y)) to the trigger's measured centre. A driver'shover()followed by anything that moves the pointer leaves a stale position, and a working hover looks broken. - Focus with real keys. Programmatic
element.focus()setsdocument.activeElement, but:focus-withinmay not match without real document focus. Click a neutral element first, then send actualTabpresses. - Click by pixel. Prefer trusted pixel clicks (
page.mouse.click(x, y)) over clicking a visually hidden input by its accessibility ref. The ref click can flip the native control without driving the framework's state. - Scope every query to the component (
fieldset label, notlabel). An unscopedquerySelectorAll('label')matched controls elsewhere on the page and reported a selection bug that did not exist. - Hit-test. Visible is not clickable:
document.elementFromPoint(x, y)must land inside the element you claim works. - Catch horizontal overflow.
document.documentElement.scrollWidth > window.innerWidthmust be false at every width.
Confirm the CSS actually shipped
A class in the markup does not mean a rule exists. Build tools drop variants silently: Tailwind's group-focus-within/nav:visible once produced no rule, leaving a hover-only menu keyboard users could never open.
[...document.styleSheets]
.flatMap(s => { try { return [...s.cssRules] } catch { return [] } })
.filter(r => (r.cssText || '').includes('my-class'))
.map(r => r.cssText.slice(0, 200));Zero results on a state you rely on (especially :focus-within) means that path is dead. When an interaction must work, write the CSS explicitly (:hover, :focus-within) instead of composing it from variants.
Screenshot traps
Take screenshots only to confirm what the numbers already proved.
| Trap | Symptom | Real cause and fix |
| Full-page stitched capture | The same top tile repeated down the image | The tool scrolls between shots, and page-level scroll-behavior: smooth (or a sticky header) fires each capture before the scroll settles. Capture viewport shots at explicit scroll offsets, or remove the smooth scroll from your own build. |
| Lazy media | Flat grey blocks | Images had not decoded. Settle 1.5 to 2.5s after scrolling before capturing. |
| Stale mouse position | Hover shot shows no panel while the trigger looks active | See "Actuate for real" above. |
Programmatic .focus() | activeElement is right but the focus styles are missing | See "Focus with real keys" above. |
CSS pitfalls that repeatedly cause these bugs
| Symptom | Cause | Fix |
| Element animates only a short distance | translateY(%) resolves against the element's own height | container-type: size on an inset-0 overlay, then animate in cqh/cqw |
| Dropdown clipped to a thin sliver | overflow-x: auto forces overflow-y: auto | overflow-x: clip; overflow-y: visible (only clip allows a visible counterpart axis) |
| Submenu inherits a fade | mask-image applies to descendants | use a sibling gradient overlay |
| Hover works, keyboard does not | Tailwind named-group variant never compiled | check the stylesheet as above; write explicit :hover, :focus-within CSS |
| Element jumps when a class toggles | Tailwind v4 -translate-y-1/2 sets translate, not transform | use the rotate/translate properties, never re-declare transform |
rotate change does not animate | transition-transform does not cover rotate | transition-[rotate] (never transition: all) |
| Every copied spacing value is ~1.6x off | The theme sets a 62.5% root font-size, so 1rem = 10px | convert each rem to px: 5rem = 50px |
Reporting
Quote the measured numbers: a value table (reference against implementation where there is one), computed values, rects, hit-test targets and per-width results. List what each verification actually exercised, and separate measured facts from inferences. "Looks right" is not evidence; a rect and a hit test are.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

