agentleFS
naingthetnaingthet/agent-skills/skills/visual-review/SKILL.md

visual-review

Skill1 starsChanged 3 months agoMITView on GitHub

Review a UI change by rendering it and looking at a screenshot, instead of reading the diff. Covers standing up an isolated component server, keeping it alive, waiting for the frame to settle, and telling expected build churn apart from toolchain drift. Use when changing anything visual, or when the user says "does this look right", "screenshot the component", "review this UI change", or "check the spacing".

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. dsifry/metaswarm★ 419same name
    2. helderberto/agent-skills★ 16same name
    3. Naoray/skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If you cannot view images, stop here and tell the user you can only read the code.

    line 17
  2. Distinctive:

    Wait for the specific thing rather than guessing.

    line 73
  3. Distinctive:

    If the repository commits its build output, a source change is incomplete without a rebuild in the same commit.

    line 89

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Visual review

Reading JSX tells you what you wrote. It does not tell you what rendered. Layout comes from the interaction of your change with a chart library, a font, a theme, and a container you did not write, so the failure is usually in the gap between them.

Three rounds of "looks right in the code" can miss a legend the chart library re-sorted, an axis band reserved twice, and paired cards whose plots start 25px apart. All three are obvious in a screenshot and invisible in the diff.

If you cannot view images, stop here and tell the user you can only read the code.

Stand the loop up before the first edit

The loop pays for itself on the second iteration, so build it before you need it. Standing it up after a change means you cannot tell whether what you see is your edit or the baseline. Take a screenshot of the unmodified component first and keep it.

Keep the server alive

A component server started with a trailing & inside a background wrapper dies when the wrapper shell exits, and you get a connection refused that looks like a port problem. Run the server as the foreground command of a background task instead.

Confirm it is actually serving before you screenshot. A screenshot of a connection error is still a PNG, and it will not look like a failure until you open it.

Pick a port nobody else uses

Component servers have a well-known default port, so two sessions on one machine attach to each other's instance. You then screenshot someone else's build and review a change you did not make. Pick a specific uncommon port and pass it explicitly.

storybook dev -p 6017 --no-open --quiet   # not the default 6006

Render one component, not the whole app

Isolated component servers expose a direct URL per story, which loads without the surrounding navigation:

http://127.0.0.1:6017/iframe.html?id=<kebab-title>--<kebab-export>&viewMode=story

Drive the theme from the DOM rather than clicking a toolbar:

document.documentElement.setAttribute("data-theme", "dark")

Shoot every theme and every breakpoint you support. A change that reads fine in light mode at desktop width is not reviewed.

Wait for the frame to settle

Screenshot too early and you capture an entry animation mid-flight, which reads as a layout bug that is not there. Charts animate on mount, web fonts swap after first paint, and images resolve late.

Wait for the specific thing rather than guessing. If the library gives you no completion signal, a fixed delay of roughly a second past mount is the practical floor, and you should say in your report that you used one.

The runner and the components may live apart

The screenshot runner is often installed in a different package.json than the component library, especially in a monorepo. Run the script from wherever the runner is installed, or the import fails with ERR_MODULE_NOT_FOUND and looks like a missing dependency.

Install both before you start. A dependency install in the middle of a review loop invalidates whatever you were comparing against.

Committed build output

If the repository commits its build output, a source change is incomplete without a rebuild in the same commit. Use the pinned toolchain version, not whatever your shell resolves.

Content-addressed chunk names make this alarming the first time. Editing a shared primitive rewrites the hash of every chunk that imports it, so a twelve-line source fix can show up as a hundred-file diff. That is the build working as designed.

To tell expected churn apart from toolchain drift, rebuild without your change and confirm the output is unchanged:

git stash push -- <source dir>   # set aside the source change only
git checkout -- <dist dir>       # restore the committed output
<build command>
git status -- <dist dir>         # must come back empty
git stash pop
<build command>                  # rebuild, or you commit stale output

Empty means your toolchain matches the one that produced the committed output, and the churn is your change. Not empty means your toolchain differs from everyone else's, and you fix that before committing anything.

Scope the stash to the source paths. A bare git stash takes the built output with it, which makes the restore a no-op and the check meaningless. Rebuild after popping, because the pop leaves the output at the committed version while your source change is back.

Report what you looked at

Say which stories you shot, at which themes and widths, and what you compared against. If you used a fixed delay instead of a completion signal, say so. A reviewer who knows you shot one story in light mode reads your conclusion differently than one who assumes you swept the set.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.