Lighthouse & Performance Optimization Prompt
Sets the AI up as a web Performance. It's for developers. Use it when short image descriptions keep giving you generic results.
You are a web performance specialist. Analyze this site and provide optimization recommendations that a designer can understand and a developer can implement immediately. ## Input - **Site URL:** [url] - **Current known issues:** [optional — "slow on mobile", "images are huge"] - **Target scores:** [optional — "LCP under 2.5s, CLS under 0.1"] - **Hosting:** [Vercel / Netlify / custom server / don't know] ## Analysis Areas ### 1. Core Web Vitals Assessment For each metric, explain: - **What it measures** (in plain language) - **Current score** (good / needs improvement / poor) - **What's causing the score** - **How to fix it** (specific, actionable steps) Metrics: - LCP (Largest Contentful Paint) — "how fast does the main content appear?" - FID/INP (Interaction to Next Paint) — "how fast does it respond to clicks?" - CLS (Cumulative Layout Shift) — "does stuff jump around while loading?" ### 2. Image Optimization - List every image that's larger than necessary - Recommend format changes (PNG→WebP, uncompressed→compressed) - Identify missing responsive image implementations - Flag images loading above the fold without priority hints - Suggest lazy loading candidates ### 3. Font Optimization - Font file sizes and loading strategy - Subset opportunities (do you need all 800 glyphs?) - Display strategy (swap, optional, fallback) - Self-hosting vs CDN recommendation ### 4. JavaScript Analysis - Bundle size breakdown (what's heavy?) - Unused JavaScript percentage - Render-blocking scripts - Third-party script impact ### 5. CSS Analysis - Unused CSS percentage - Render-blocking stylesheets - Critical CSS extraction opportunity ### 6. Caching & Delivery - Cache headers present and correct? - CDN utilization - Compression (gzip/brotli) enabled? ## Output Format ### Quick Summary (for the client/stakeholder) 3-4 sentences: current state, biggest issues, expected improvement. ### Optimization Roadmap | Priority | Issue | Impact | Effort | How to Fix | |----------|-------|--------|--------|-----------| | 1 | ... | High | Low | [specific_steps] | | 2 | ... | ... | ... | ... | ### Expected Score Improvement | Metric | Current | After Quick Wins | After Full Optimization | |--------|---------|-----------------|------------------------| | Performance | ... | ... | ... | | LCP | ... | ... | ... | | CLS | ... | ... | ... | ### Implementation Snippets For the top 5 fixes, provide copy-paste-ready code or configuration.
Source: awesome-chatgpt-prompts (CC0).
How to use this prompt
- 1
Copy the prompt
Use the copy button, or type its Retext trigger in any app to paste it.
- 2
Open your AI assistant
Start a new chat in ChatGPT, Claude, Gemini or the assistant you use.
- 3
Fill in the details
Replace any [bracketed] parts with your own details.
- 4
Check and refine
Read the answer, then reply with one change at a time.
Tips for better results
- •Fill in [url], [specific_steps] before you send it. The rest of the prompt depends on those details.
- •Image tools differ in which settings they read (aspect ratio, style flags, negative prompts). Keep the subject and style lines, and drop settings your tool ignores.
- •To steer the web Performance, add one line after the prompt about your situation: your level, your goal and anything to avoid.
- •It's a long prompt, so save it as a Retext snippet: type ;lighthouse in any app instead of finding and pasting it each time.
Get the free prompt pack
Our best coding prompts in one Markdown file, delivered by email. The templates here stay free either way — the pack just saves you the copying.
Variations
Different style
Keep the subject and composition, and replace the style details with: [style, e.g. watercolor, 35mm film photo, flat vector illustration].
Different format
Add this line: Compose for a [aspect ratio, e.g. 9:16 phone wallpaper] and leave empty space at the [top/bottom] for text.
Context first
Add this line at the end: Before you start, ask me up to three questions about what I need from the web Performance and wait for my answers.
Save it as a Retext snippet
Retext is a free text expander for Mac. Save this prompt once, then type ;lighthouse in any app (ChatGPT, Claude, your editor, a browser tab) and the full prompt is pasted in.
- Click Add to Retext. The prompt installs as a snippet with the trigger ;lighthouse.
- Change the trigger in Retext if you prefer a different one.
- Type the trigger wherever you want the prompt, then fill in the brackets.
Frequently asked questions
What does the Lighthouse & Performance Optimization prompt do?
Sets the AI up as a web Performance. It's written for developers.
Which AI tools does it work with?
It's plain text, so you can paste it into any image generator that takes text prompts, or into a chat assistant that creates images. Drop any settings your tool doesn't support.
What do I need to fill in?
Replace [url], [specific_steps] with your own details. Leave the rest as it is unless you want to change how the AI answers.
Can I save this prompt as a snippet?
Yes. Click Add to Retext and it installs as a snippet with the trigger ;lighthouse. Type that in any Mac app to paste the full prompt.
Related Templates
Get the free prompt pack
Our best coding prompts in one Markdown file, delivered by email. The templates here stay free either way — the pack just saves you the copying.