Claude Code

Verified against Claude Code · 2026-07-22

Fix a UI bug from a pasted screenshot instead of a vague text description

A visual-debugging prompt built around a pasted image of the broken UI, forcing Claude Code to name the specific visual discrepancy and locate the responsible component before editing, and to close the loop with a follow-up screenshot comparison instead of declaring the fix done from the diff alone.

Claude Code5 fillable variables

The prompt

Ready to copy — highlighted parts are example details you can swap.

An image is attached showing the actual broken state of the UI. Look at it directly before reading anything else below — the screenshot is the primary evidence here, not a supporting detail to the text description.

WHAT THE SCREENSHOT SHOWS
The pricing table on the /pricing page has its middle "Pro" plan card overlapping the card to its right by about 20 pixels, only at the tablet breakpoint.

WHAT IT SHOULD LOOK LIKE INSTEAD
All three plan cards should sit in an evenly spaced row with no overlap, matching how they already render correctly on desktop.

VIEWPORT AND CONTEXT THE SCREENSHOT WAS TAKEN AT
Screenshot taken at 768px width in Chrome; also check 820px and 900px, the other two breakpoints this component defines.

COMPONENT SUSPECTS, IF ANY ARE ALREADY KNOWN
Likely PricingCard.tsx or the shared .grid-3-col utility class it uses, but not confirmed.

PROCESS
1. Describe back, in your own words, the specific visual discrepancy you actually see in the image — not a restatement of the text description above, an independent read of the pixels themselves: what element, what property, roughly how far off, at what point in the layout. If what you see does not match The pricing table on the /pricing page has its middle "Pro" plan card overlapping the card to its right by about 20 pixels, only at the tablet breakpoint., say so before proceeding rather than silently trusting the text over your own read of the image.
2. Locate the component and the specific CSS or layout rule responsible, citing the real file and selector, not a guess based on what usually causes this category of visual bug. If Likely PricingCard.tsx or the shared .grid-3-col utility class it uses, but not confirmed. names a candidate, check it first, but do not stop at the first plausible-looking rule if it does not actually explain the specific discrepancy described in step one.
3. Before editing, state the specific property change that should fix it and, just as important, whether that same rule affects any other component or breakpoint, since a fix scoped to a shared class or a global selector can resolve the reported instance while visually changing something nobody reported as broken.
4. Make the change, scoped to the specific rule identified, not a broader rewrite of the surrounding component.

AFTER THE CHANGE
A local dev server is running at localhost:3000 and can be checked via the browser tools available in this session.
If a way to re-check the rendered result exists in this session, capture it and compare directly against All three plan cards should sit in an evenly spaced row with no overlap, matching how they already render correctly on desktop. before declaring the fix complete — a diff that looks correct in the source is not the same evidence as a rendered result that actually matches, and CSS in particular has enough interaction effects between an edited rule and its surrounding cascade that reading the changed line is not sufficient proof on its own.
If no way to re-render exists in this session, say so explicitly and name exactly what a human should visually check before merging, rather than presenting the change as visually verified when it was not.

CONSTRAINTS
- Do not fix the general area if you cannot state the specific discrepancy; a vague 'this looks better' is not an acceptable basis for a change.
- Do not assume the screenshot's viewport is the only one affected — check whether the same rule applies at other breakpoints named in Screenshot taken at 768px width in Chrome; also check 820px and 900px, the other two breakpoints this component defines..

Customize

Optional — swap in your own details for the highlighted parts above.

Why this works

A text-only description of a visual bug is a lossy translation of exactly the kind of detail that actually matters for fixing it — 'the cards overlap' says nothing about which edge overlaps which, by how much, or at which breakpoint, while the pasted screenshot Claude Code can read directly contains all of that as pixels a vision-capable model can actually inspect, which is why the process forces an independent read of the image itself rather than treating the accompanying text as a complete substitute for looking. Requiring that independent description before proceeding, and requiring a flag if it disagrees with the supplied text, catches a specific and common failure: a bug report's own text description is itself sometimes wrong or imprecise about what is actually happening, written by someone under time pressure who noticed something was off without precisely characterizing it, and a model that defers entirely to a possibly-imprecise text description will confidently fix the wrong thing with full confidence. Naming the specific CSS rule or layout mechanism responsible, rather than accepting the first plausible-looking candidate, matters because visual bugs disproportionately live in shared classes and cascading rules whose effect at one breakpoint is not obvious from reading the rule in isolation — a fix that resolves the reported card overlap by editing a utility class shared across a dozen other components can simultaneously and silently break something nobody screenshotted because nobody happened to look at that other component today. The instruction to close the loop with an actual re-render, when a way to do so exists in the session, targets the gap between 'the diff looks like it should fix this' and 'the rendered page actually looks correct now' — CSS is one of the few areas of a codebase where reading the changed line is a genuinely weak proxy for the visual outcome, since cascade interactions, specificity, and inherited properties from parent elements can all produce a rendered result that differs from what the diff alone would suggest. Being explicit when no re-render is possible, rather than presenting the change as visually verified regardless, preserves the actual distinction between 'I changed the rule that should cause this' and 'I confirmed the visual result matches', which is exactly the distinction a screenshot-driven bug report was filed to get closure on in the first place.

Verified against

Claude Code Sonnet 4.6 · 2026-07-22

Changelog

  • 2026-07-22 Initial publish, verified against Claude Code with pasted-image input (Sonnet 4.6).

Building this for real?

This is a free starting point. If you'd rather have custom software built and running for your business, that's Scult's day job.

EXPLORE CUSTOM SOFTWARE
All Claude Code prompts

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY