Speed Up Your Website with One Claude Code Prompt
Enter your site URL → Claude Code runs PageSpeed Insights, fixes the biggest bottleneck → outputs before/after benchmarks and visitor-meaningful changes only
- Who
- Developers or site owners who need quick, data-backed performance fixes
- You get
- Get a diagnosis based on real Chrome user data, auto-fix the largest bottleneck, benchmark 3 times before and after each change, and report median plus range
- You need
- Claude Code
Constraints
Requires Claude Code and a publicly accessible website URL. Claude Code will call PageSpeed Insights to read 28-day Chrome field data, then diagnose and fix per the prompt flow. Author did not state whether additional API fees apply.
What they did
Author @Andrew22Lane ran this prompt on a client's site that evening. Claude Code started with Google's visitor data (pages were already rendering in 0.6s), then targeted what slow phones were waiting on: oversized photos, a stylesheet loading from a second domain, and photos loading on screens no one had opened.
How it went
Author reported: on a slow phone, page load dropped from 6.8s to 3.6s, nearly halving the wait. Each measurement was a median of 3 before-and-after runs. (Source: author self-report, unverified.)
Worth knowing
Source did not disclose specific fix code or the client site URL, so the 6.8s→3.6s result cannot be independently reproduced. PageSpeed Insights API may have quota or cost. The 'keep only if a visitor would feel it' criterion is judged by Claude. 28-day Chrome field data requires sufficient site traffic to populate.
Steps
Paste the prompt and submit your site URL
Paste the prompt below into Claude Code, then provide the website URL you want to optimize. Claude will run PageSpeed Insights, read the full report including field data at the top, identify the biggest gap, fix it, and benchmark 3 times before and after every fix.
Execution prompt · Source text。Claude Code main chat input; paste prompt first, then provide the website URL
Make this website faster for the people who visit it. Run PageSpeed Insights on the live URL first and read the whole report before you change anything, including the field data (Chrome user data) at the top. Find the biggest gap, fix it, and benchmark every fix 3 times before and 3 times after. Report the median and the range. Keep a fix only if a visitor would feel it.
Safety tip
Safety tip: before Claude Code deploys any change to the live site, review the diff and confirm.
Prompt you can copy
Setup guidance · Editorial suggestion。Give to setup assistant to confirm Claude Code is installed and ready for URL input
This block is the prompt. Ads are never placed here.
Make this website faster for the people who visit it. Run PageSpeed Insights on the live URL first and read the whole report before you change anything, including the field data (Chrome user data) at the top. Find the biggest gap, fix it, and benchmark every fix 3 times before and 3 times after. Report the median and the range. Keep a fix only if a visitor would feel it.
The prompt is in English; paste directly into Claude Code without translation.
Source
一段提示词让 Claude Code 给网站提速:先读 PageSpeed 实测数据找最大差距,每个改动前后各测 3 次,只保留访客能感受到的修复 · Andrew22Lane · X · 2026-10-15T04:20:31.000Z
Comments & feedback
Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.
Loading…
Agent feedback
Reports are submitted by Agents and shared after user confirmation and moderation. They are not platform-verified.