Improve Website PageSpeed With Claude Code: From 42 to 94

When a website scores 42 on PageSpeed, it is not just slow. It is losing real traffic - from search rankings that Google penalizes for slow sites, and from visitors who click away before the page finishes loading.

The site works. It loads. But 42 is a score that explains why traffic is not converting, not a problem that fixes itself over time.

Most people either hire someone to fix it, or they accept the problem and move on. Both make sense, because the audit report is long, technical, and hard to read without experience.

The process that moved this site from 42 to 94 has four steps.

  1. Run your site through PageSpeed Insights and download the full audit report.
  2. Paste the report into a Claude Code session and ask it to rank the fixes by impact.
  3. Open Safari Developer Tools and use the Network tab to understand what is slowing the load down.
  4. Apply each fix with Claude Code, re-run the audit, and repeat until all issues are resolved.

The sections below explain what happens at each step and why the order matters.


What the Audit Tells You - and What It Does Not

PageSpeed Insights measures several things at once: how fast the first content appears on screen, how stable the layout is while the page loads, how long before the page responds to a tap or click. Each factor has a score. Together, they produce the number you see.

A score in the 40s means the site is failing several of these at once. Not completely broken - but failing in ways that add up. Large images delay the first thing you see. Style code that is never used still forces the browser to download it. Scripts that run too early make the page wait before showing anything.

The problems are not mysterious. They are fixable. The hard part is knowing which ones to fix first, because fixing them in the wrong order produces small gains when large gains are available.

This is where most improvement efforts stall. The audit gives you a list. Without context, you can spend hours on low-impact changes and miss the ones that move the score.


What Claude Code Changes About This Workflow

The typical approach is to read the audit, search for each issue separately, find a fix, apply it, and check whether the score moved. This is slow and inconsistent because many fixes are connected - what you change in one place affects what needs to change in another.

Claude Code changes the sequence. You give it the full audit report and it reads everything at once. It identifies the issues, ranks them by impact, and then works through each fix with you in the same session.

The agent reads your site’s files directly, finds exactly where each problem lives, and writes the specific changes needed.

Without Claude Code
  • Read the audit manually and try to interpret each item
  • Search for fixes one by one, without knowing what to prioritize
  • Apply changes and hope the score moves
  • Re-run the audit and start again from the list
With Claude Code
  • Paste the full report into a session
  • Claude Code ranks the fixes by impact for your specific site
  • Work through each fix in the same session
  • Verify each change before moving to the next

The difference is not just speed. It is accuracy. You are not guessing what will move the number. You are working from a complete analysis of your specific site.


The Five Fixes That Moved the Score

On this site, the issues that mattered most were the following.

What the audit flagged - ranked by impact

  • Images saved in the wrong format - switching to WebP was the largest single gain
  • Images with no fixed size defined - causing the page layout to jump while loading
  • Style code downloaded by the browser but never actually used on the page
  • Scripts running too early - before the main content was ready to appear on screen
  • Images loading even when they are not yet visible on screen

Claude Code read the full report, identified these five issues, explained which to fix first and why, and then worked through each change - converting the images, setting fixed sizes, removing unused style code, adjusting when scripts run, and making off-screen images load only when needed.

The image format change alone moved the score by approximately 20 points. The layout jump fixes added another 15. By the time all five were addressed, the score had moved from 42 to 94.

None of these required deep technical knowledge to implement. They required knowing exactly what to change, in what order - which is what the audit, read correctly, tells you.


How to Run This on Your Own Site

The workflow is the same for any website.

Open PageSpeed Insights and run your site. When the results load, look for the download icon in the top right of the report - click it to save the full report file. Open a Claude Code session, paste the complete report, and ask the agent to rank the fixes by impact and walk you through them one at a time. Apply each fix in the same session, then re-run the audit to confirm the improvement before moving to the next issue.

The score you reach depends on your starting point. What does not change is the process: full audit first, fixes in the right order, results verified.

This is part of the Build System - the layer where Claude Code stops being a tool you experiment with and starts producing real, measurable results. The Website PageSpeed Template contains the full prompt pack, fix checklist, DevTools guide, and video walkthrough used in this optimization.


Frequently Asked Questions

Do I need to know how to code to do this?

No. Claude Code handles the actual changes to your files. What you need is the ability to open a terminal, start a Claude Code session, and paste the audit report into it. The agent identifies the problems, writes the fixes, and explains each step. Your job is to review each change before it is applied and re-run the audit when the session is done.

How do I download the full audit report?

Run PageSpeed Insights on your site. When the results appear, look for a small download icon in the top right of the report. Click it to download the report file. Open it in any text editor, select everything, and paste it into your Claude Code session. The agent needs the complete file - not just the summary score - because the detail is what tells it which files are causing each problem.

Does this work on my website platform?

The audit works on any public website. What Claude Code can fix depends on whether you have direct access to your site’s files. If you do - on any custom-built site or a platform that gives you file access - it can implement every fix in the same session. If your site is on a fully hosted platform with no file access, Claude Code can still tell you exactly what is wrong. Many of the fixes, like image compression and lazy loading, can be applied through the platform’s own settings.

My score is already around 65. Is it still worth doing this?

Yes. Google treats anything below 90 as needing improvement, and users on slower connections will notice the difference. The same workflow applies: run the audit, paste the full report, work through the highest-impact fixes in order. In that range, fixing the image format and layout stability issues alone typically moves the score past 85 in a single session.

€79 Template
Website PageSpeed Template

The complete workflow used in this optimization - prompt pack, fix checklist, DevTools guide, verification workflow, and video walkthrough. Run it on your site this week.

Get the Template →