Glasses on
Give the agent real vision for frontend/UI work — render, screenshot, and vision-judge, never guess from markup alone. Two triggers: a screenshot or design reference that needs turning into codebase-aware code (Generate), or any claim about how something renders — matches a design, is aligned, is responsive, a regression check — even unstated (Verify). Reachable by other skills and subagents (e.g. a designer subagent), not just by typing the name.From its SKILL.md
npx -y skills add thisisdhika/skills --skill glasses-onAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
11.8 KB, as published. Nobody here has run it
Glasses On
Code is not pixels. Reading markup and CSS is not the same as seeing the rendered result — flex-wrap edge cases, font-loading races, browser rounding, and viewport-dependent layout all produce outcomes that aren't fully predictable from source alone. Every branch below runs on one shared loop that exists to stop the agent from guessing and make it actually look.
NEVER guess. See the actual presentation instead. "This should render correctly" based on reading the markup/CSS is not a finding — it's a guess wearing a finding's clothes. Every claim this skill touches gets resolved by looking at the real rendered output, not by reasoning about what the source implies it should look like.
ALWAYS use the available browser-equivalent tool. If the harness exposes
any capability that renders and captures a real view — a browser-driving
tool, a preview/screenshot capability — it MUST be used; this is never
optional when one exists. Don't conclude "no browser tool" from what's
merely visible in the current tool list — deferred tools that need a lookup
before they're callable (e.g. a ToolSearch-style discovery step) still
count as available. Search for one before falling back to a lower tier in
Tool availability below.
The loop (shared by both branches)
- Render — load the real page/component. Mandatory when the harness has a browser tool: use it. This is the gold standard — it catches real rendering issues no static reasoning predicts. If the user supplied a reference image, check its pixel dimensions first and set the viewport to match (or match its aspect ratio, if the target is a region within a larger page) before capturing anything. Two screenshots framed differently — a wide reference against a narrow capture, say — make the Judge step compare noise, not signal; matching the frame is what makes the comparison meaningful. This is about framing the shot the same, not about achieving pixel-identical output — see the DPR/rendering note in Common pitfalls for why exact pixel-parity isn't the goal. Wait for fonts/images/hydration to actually finish, capture interactive states (hover/focus/error) when the claim concerns them, not just the resting state.
- Screenshot it.
- Judge — compare against the target (reference image, or the previous screenshot for a regression check) using whatever vision capability the harness exposes. Ask specific, structured questions, never an open-ended "what's wrong with this?" — "compare the spacing between these nav items to a 16/24px grid," "is the button text vertically centered, describe any offset," "list every element whose color looks inconsistent with the rest of the palette." A vague prompt produces vague filler. Give every aspect its own pass — spacing, alignment, color/contrast, typography (family, weight, size, line height), iconography, borders/shadows, and state (hover/focus/error) if relevant — rather than one holistic look-over. A holistic pass reliably catches the one glaring issue and misses the three quiet ones sitting right next to it.
- Fix based on what was actually observed, not assumed. Keep the screenshot from before this fix — it's the "before" half of the next step, not a discardable intermediate.
- Re-render and re-judge — always as a before↔after pair, every single update, not just a final-vs-target check. Compare the new screenshot to both: the target (is it converging on the reference?) and the immediately preceding screenshot (did this specific edit move the right thing, and did it break anything that was already fine?). A target-only comparison can call a run "closer" while missing a fresh regression the before/after pair would have caught directly. Repeat from step 1 until judgment finds nothing structurally meaningful left against the target — not a fixed percentage or threshold, a judgment call each time. Scattered low-magnitude differences are usually font-rendering/anti-aliasing noise; don't chase those. Large contiguous mismatches are usually real layout/spacing bugs; fix those first.
Never skip straight to step 4. "I updated the padding so it should look right now" is not a verified claim until re-screenshotted and re-judged against both the target and what it looked like before this edit.
Tool availability (check once, applies to the whole run)
Actively look before declaring a tier unavailable. A browser-equivalent
tool that isn't in the currently visible tool list is not the same as one
that doesn't exist — check for a discovery/search mechanism the harness
exposes (e.g. a ToolSearch-style lookup) and use it to look for a
browser-driving or rendering tool before dropping to tier 2. Dropping a tier
because a tool "wasn't listed" without having checked is exactly the kind of
guess this skill exists to prevent.
- Browser tool available → the loop above runs as written. This is the only tier that actually satisfies "see the actual presentation" — treat it as required whenever it can be reached, not merely preferred.
- No browser, but the harness can view an image file (native multimodal file-reading, or a dedicated vision tool) → step 1 can't happen; compare the reference image against the generated code's plausibility instead of an actual render. Proceed, but say so explicitly, early — not buried in the final report. State plainly that this run has no rendered verification and is lower-confidence than a real render-compare.
- No vision capability at all → the Verify branch cannot run. Say so and stop; don't fabricate a judgment.
Describe the capability needed (render, screenshot, view an image, compare two images) and match it to whatever the current harness actually exposes — tool names and parameters vary (a dedicated vision tool, native multimodal file-reading, a browser-driving agent) and none of them is safe to assume present by name.
Generate: screenshot/design reference → code
- Explore the codebase first — mandatory, before writing anything.
Check
CLAUDE.md/AGENTS.mdfor a### house-styleentry first — aFRONTEND_STANDARD.md(or similar) already answers most of this with structured, human-confirmed rules rather than inferred-from-scratch guesses; read it and skip re-deriving what it already states. Whether or not one exists, still find the existing component library, design tokens (Tailwind config, CSS custom properties, theme files), file/folder conventions, and any component that already resembles what's being built — a house-style doc won't cover every project-specific detail (which button component to reuse, say). This is not optional groundwork — an agent that's already thorough-ish will sometimes skip it and sometimes not, and that inconsistency is exactly what a mandatory step removes. Cache findings for the rest of this session only; a fresh session re-explores rather than trusting stale memory of a codebase that can have changed. - Scope check. One component or one clearly-bounded region per run. Handed a whole-page screenshot? Ask which region to start with — don't guess a decomposition into multiple components.
- Generate, reusing over inventing. Prefer an existing component over a new one; match the existing token scale and naming conventions found in step 1. Land files wherever similar components already live in this repo, not in a fresh location of the agent's choosing.
- Assets: for icon-shaped elements, match against the codebase's existing icon library (found in step 1) by visual similarity — never invent new icon SVGs. For photos/illustrations with no existing match, use a clearly-labeled placeholder and flag it for the human to supply the real asset later. Never substitute an image-generation tool here — that's a generation capability, not an asset-sourcing one.
- Run the loop (above) against the generated result until it converges or a tool-availability limit is hit (see Tool availability).
- Stop at the review packet — the one mandatory human gate. Generation and the fix-loop in steps 3–5 run autonomously; this is the only required checkpoint. Assemble: which components were reused vs. newly created, the before/after screenshot pair from the loop's first and last iteration (not just prose about how it went — show it), any degraded-confidence flag from a tier-2 fallback, and any unresolved asset placeholders. Present this and wait — don't consider the task done before a human has seen it. The only exception is a task-scoped triviality (e.g. a one-line tweak to an already-approved component) — never a pipeline-wide or config-level opt-out of this gate.
Completion criterion: the review packet is presented and the human has responded — approved, requested changes, or explicitly waved off the gate for a trivial case. Silent completion is not done.
Verify: check a visual claim
Run the loop above against whatever claim triggered this — a design comparison, an alignment question, a responsiveness check, a regression check between two states. No code changes are implied unless asked; report findings plainly (what was checked, at what viewport/state, what the judgment found). If a genuine issue is found and fixing it is in scope, loop through steps 4–5 above the same way Generate does — same gate rule: present the finding and the before/after pair for human sign-off, don't self-declare a visual bug fixed without a human seeing both states.
Completion criterion: a plain answer to the original claim — confirmed, refuted, or refuted-and-fixed-pending-review — never a vague "looks mostly fine."
Common pitfalls
- Guessing from source instead of looking. "The CSS looks right so it should render fine" is the exact failure mode this skill exists to prevent — resolve every claim against a real render/screenshot, never against what the markup implies.
- Declaring "no browser tool" without checking for a deferred one. A tool absent from the visible list may still be reachable via the harness's own discovery mechanism — search before dropping to tier 2.
- Screenshotting too early. Fonts, images, and hydration can still be loading. A diff from a half-loaded page isn't a real bug.
- Unpinned viewport. Comparing screenshots taken at different window sizes invalidates the comparison. Always set it explicitly.
- Chasing resolution/DPR mismatches. A reference at one resolution and a render at another will look different in raw pixels even with identical layout — this is why the loop uses vision judgment, not pixel arithmetic, to compare. Don't try to force-align dimensions first.
- One generic comparison prompt for every check. Specific questions produce specific, useful answers.
- Re-declaring success without re-rendering, or checking only against the target and skipping the before/after pair. After every fix, go back to step 1, and judge the new screenshot against both the target and what it looked like before this specific edit — a target-only check can miss a regression the edit just introduced.
- Skipping the review packet on a whole pipeline because one task in it was trivial. The task-scoped exception is per-task, not a standing opt-out.