Skip to main content

Claude/ChatGPT Prompt to Audit Core Web Vitals and Plan Fixes

Turn your LCP, INP, and CLS numbers into a prioritised, code-level Core Web Vitals fix plan, with the likely cause and concrete remediation ranked by impact.

Fill in the placeholders

Edit the values, then copy your finished prompt.

Your Prompt
prompt.txt

                                

What this prompt does

This prompt turns your Core Web Vitals numbers into a prioritized, code-level fix plan and returns concrete code or config, not vague advice. It casts the AI as a frontend performance engineer. You provide the [url], the [framework], and a pasted [cwv_report]. For each of LCP, INP, and CLS it returns the current value, a target, likely causes ranked by probability, and a code or config fix, plus the expected improvement per fix, whether it needs infra or only frontend, a priority order computed by impact over effort, and a regression-guard note.

The value is converting a raw report into an ordered fix list instead of guessing. Most CWV regressions trace to a handful of culprits — oversized hero images, blocking JS, layout shift from late content — and ranking causes by probability points you at the likely one first. Sorting by impact divided by effort stops you from chasing low-value green-score wins, and the regression-guard note flags which metric a careless fix could worsen.

When to use it

  • Translating a [cwv_report] into a concrete, code-level fix plan
  • Prioritizing fixes by impact over effort instead of guessing
  • Diagnosing LCP, INP, or CLS issues in a specific [framework]
  • Separating fixes that need infra changes from frontend-only ones
  • Avoiding regressions where fixing one metric quietly worsens another
  • Stopping the chase for green scores once real user metrics improve

Example output

You get a ranked table with columns for metric, fix, code snippet, expected delta, and infra-or-frontend, followed by the highest-priority snippet in full. Each of LCP, INP, and CLS gets its current value, a target, causes ranked by probability, and a concrete code or config fix. A regression-guard note flags which metric each change could worsen if applied carelessly, so you can avoid trading one regression for another.

Pro tips

  • Paste the full [cwv_report] with real numbers — the diagnosis and ranking depend on actual values, not field-vs-lab assumptions you skip
  • Set [framework] precisely (e.g. Next.js 15) so the fixes use the right APIs, like the framework's image and script components
  • Work the list in impact-over-effort order and stop once real user metrics improve, rather than chasing a perfect lab score
  • Read the regression-guard note before applying a fix — aggressive INP work can shift cost onto LCP if done carelessly
  • Distinguish the infra-or-frontend flag so you batch infra changes separately from quick frontend wins
  • Re-measure after each change with the same [url] so you attribute the delta to the specific fix you shipped
  • Start from the highest-priority snippet returned in full, ship it, confirm the delta, then move down the ranked table rather than batching everything at once

Frequently Asked Questions

Does it give me actual code or general tips?
It returns concrete code or config per metric, plus the highest-priority snippet in full. The prompt is built to avoid vague advice, though you should still apply and re-measure each fix in your own environment rather than trusting the expected delta blindly.
How does it decide which fix to do first?
It computes a priority order by impact divided by effort, highest first. That keeps you from spending hours on a low-value change just to nudge a lab score, and focuses effort on the fixes most likely to move real user metrics meaningfully.
Will fixing one metric break another?
It includes a regression-guard note flagging which metric each change could worsen if done carelessly. For example, aggressive INP work can shift cost onto LCP, so reading that note before applying a fix helps you avoid trading one regression for another.
What does it need from me to be accurate?
Paste a real `[cwv_report]` with actual LCP, INP, and CLS values and set the `[framework]` precisely. The diagnosis ranks causes by probability from those numbers, so accurate input is what separates a targeted fix plan from generic performance guesses.
Engr Mejba Ahmed

Need this built for real?

Engr Mejba Ahmed

AI Developer · Software Engineer

I'm Mejba — I design and ship production AI systems, automations, and full-stack apps. If you want this turned into a working solution for your team, let's talk.

More in Frontend Development Prompts

Engr Mejba Ahmed

Engr Mejba Ahmed

Claude Code Expert · Online

👋

Hey there!

Quick Actions

WhatsApp Instant reply

Chat on WhatsApp

+880 1723 741224 · Instant reply

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

[email protected]

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support