The best AI prompts for fixing Lighthouse and Core Web Vitals share three rules: attach a stripped AIReport JSON (<50KB) instead of a 2MB raw PSI dump, tell the model to rank work by scorePlan.pointsAtRisk (never savings.ms), and constrain edits to first-party fixLocation surfaces so the model does not hallucinate changes to third-party scripts.
Below are five battle-tested, copy-paste prompts you can use with ChatGPT, Claude, Cursor, OpenAI Codex, or any MCP coding agent.
Which Prompt Should You Use?
| Goal | Best Prompt Below | Best AI Tool |
|---|
scorePlan Triage | ChatGPT, Claude |
| Ship the highest-impact fix in 15 minutes | Prompt 2: Single-Metric Quick Win | Cursor, Claude Code, Codex |
| Get copy-paste unified diffs for a PR | Prompt 3: Code Diffs by fixLocation | Cursor, Windsurf, Cline |
| Autonomous edit + re-scan loop | Prompt 4: MCP Fix-Until-90 Loop | Claude Code, Cursor, Windsurf |
| Explain performance to a non-technical client | Prompt 5: Plain-English Executive Summary | ChatGPT, Claude |
Prompt 1: Full scorePlan Triage (Best First Prompt)
Use this when you attach an AIReport for the first time and want a clear, ranked plan:
The attached JSON is a stripped AIReport from PageSpeed Exporter for [URL].
My stack is [Next.js 16 / WordPress / Shopify / React / plain HTML].
1. Read scorePlan first. State each lab metric's numericValue, pointsAtRisk, and targetFor90.
2. List the failing issues whose affectsMetrics includes the metric with the largest pointsAtRisk. Do not sort by savings.ms.
3. For each issue, cite the exact culprit from details (selector, URL, source module, or LCP subpart) and its fixLocation.
4. Provide the exact code or config change needed for each first-party issue. Do not pretend to edit remote third-party files.
5. Apply any relevant stackPacks hints, skip passedAuditIds, and note if fieldData (CrUX) diverges from lab metrics.
Prompt 2: Single-Metric Quick Win (LCP, CLS, or TBT)
When you want to move the needle fast without getting buried in 20 minor diagnostics:
From this PageSpeed Exporter AIReport:
1. Name the single lab metric in scorePlan with the highest pointsAtRisk.
2. Give me only the top 3 failing issues whose affectsMetrics includes that metric.
3. For each of the 3 issues, output:
- Audit ID and fixLocation
- Exact culprit row from details
- Exact code or config change to reach targetFor90
4. Skip passedAuditIds and ignore any audit that does not affect that top metric.
Prompt 3: Unified Code Diffs for Your Codebase
Best inside Cursor, OpenAI Codex, or GitHub Copilot when your repo is open:
Read @aireport.json (a stripped PageSpeed Exporter AIReport for [URL]).
1. Pick the highest pointsAtRisk metric in scorePlan.
2. Map each culprit in details (selector, script URL, unused source module) to the real file paths in this workspace.
3. Produce minimal unified diffs (--- before / +++ after) for every first-party fixLocation ("code", "build-config", "asset").
4. For thirdParty culprits, show how to defer or lazy-load the embed from our layout instead of editing remote files.
5. Tell me the exact targetFor90 threshold we are verifying on the next re-scan.
Prompt 4: Autonomous MCP Fix-Until-90 Loop
Use this with our MCP server in Claude Code, Cursor, Windsurf, or Cline:
Call analyze_url on https://[preview-url] using strategy "mobile" (or "both" on Starter/Pro).
1. Read scorePlan and fix the metric with the largest pointsAtRisk first.
2. Edit the project files directly using fixLocation and culprit details, then run our build/tests.
3. After deployment, call analyze_url again. Remember lab scores vary by about ±5 points.
4. Stop only when every pointsAtRisk metric has reached targetFor90 and no accessibility, best-practices, or SEO issues remain.
Prompt 5: Plain-English Client or Stakeholder Summary
Useful for agencies and consultants sharing findings with non-technical teams:
Translate this PageSpeed Exporter AIReport for [URL] into a clear 1-page summary for a non-technical stakeholder.
1. Summarize the current mobile score and whether Core Web Vitals (LCP, INP, CLS) pass or fail in plain English.
2. List the top 3 bottlenecks from scorePlan in priority order, explaining what the user experiences (slow hero image, jumping buttons, sluggish clicks) rather than jargon.
3. Separate quick wins (under 1 hour) from larger engineering work.
4. Note whether real-user CrUX fieldData matches the lab test.
Built-In Prompt Templates in PageSpeed Exporter
You do not have to maintain these prompts manually. After running any audit at speedexporter.com, click Copy Prompt on the results page to copy your stripped AIReport pre-wrapped with a tuned template:
- Free (\$0, 5 reports/month): 2 templates (Full Analysis, Plain English)
- Starter (\$9/month, 50 reports/month): All 5 templates + Desktop/Both strategies + before/after comparison
- Pro (\$29/month, 200 reports/month): All 5 templates + batch ZIP export for agencies (view pricing)
Further Reading
- How to Get the Most Out of PageSpeed Exporter — complete audit-to-90 workflow
- Lighthouse MCP Server for Claude Code, Cursor & Windsurf — automate Prompt 4 via MCP
- How to Fix Largest Contentful Paint with AI — LCP-specific prompt & diff example
- How to Fix INP with AI — main-thread responsiveness prompts
- All AI Coding Tool Workflows — ChatGPT, Claude, Cursor, Copilot, Windsurf, Claude Code, Codex, Cline