audit-pagespeed

Audits PageSpeed Insights scores via Playwright and maps failing Lighthouse audits to source files.

Updated Aug 1, 2026
One-click install
npx skills add https://github.com/dxiiren/project-skeleton --skill audit-pagespeed-dxiiren
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audit-pagespeed
Source: https://github.com/dxiiren/project-skeleton/tree/main/.claude/skills-optional/audit-pagespeed
Command: npx skills add https://github.com/dxiiren/project-skeleton --skill audit-pagespeed-dxiiren

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Getting real Google PageSpeed Insights scores for both mobile and desktop, then figuring out exactly which code causes each failing audit, is slow and error-prone — the PSI REST API hits anonymous quota limits, the rendered report truncates element tables, and a stubborn 99-vs-100 score is hard to diagnose without understanding Lighthouse's rounding and variance behavior. ## Core Features & Use Cases - UI-driven PSI runs: Drives pagespeed.web.dev with the Playwright MCP (no API key or quota needed) and extracts the complete Lighthouse JSON for both form factors from the page's window globals. - Source-mapped fix lists: Turns every failing audit into a fix list tied to the metric it moves, using node selectors and labels to grep back to the responsible source code. - Road-to-100 playbook: Includes dead-weight audits (unused fonts, wasted preloads), pre-FCP CPU profiling via CDP, throttled-pipe arbitration, interleaved A/B prototype discipline, variance math, and an automated sampling loop to capture a verified 100. - Use Case: A developer asks "why are we not 100 on pagespeed" — the skill runs both form factors, detects a deterministic LCP ceiling caused by a dead webfont preload, removes it, and verifies quad-100 scores with screenshots. ## Quick Start Ask the assistant to run a PageSpeed audit on your deployed production URL and list the failing audits with their source files.

Frequently Asked Questions about audit-pagespeed

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a PageSpeed Insights audit without an API key?

Drive the pagespeed.web.dev UI directly with the Playwright MCP using a deep link like /analysis?url=<target>&form_factor=mobile. This avoids the PSI REST API's shared anonymous quota, which is usually exhausted and returns 429 errors.

How to extract full Lighthouse JSON from pagespeed.web.dev?

The complete Lighthouse Result for both mobile and desktop is available on the page's window object as __LIGHTHOUSE_MOBILE_JSON__ and __LIGHTHOUSE_DESKTOP_JSON__. Evaluate a small JavaScript function via the Playwright MCP to extract category scores and failing audits into a file.

Why does PageSpeed Insights show 99 instead of 100?

Lighthouse rounds each metric score to two decimals before weighting, so a tuned page can lose about 0.1 point to clamping alone. Check which metric sits on a rounding boundary using raw numericValues, and rule out a deterministic ceiling where one metric repeats the exact same millisecond value across runs.

Can PageSpeed Insights test a localhost development server?

No, PSI is a hosted Google service and cannot reach localhost; it requires a publicly reachable deployed URL. For local iteration, use the Lighthouse CLI with simulated throttling and compare base-vs-prototype deltas rather than absolute numbers.

Why do PageSpeed scores vary between runs?

PSI runs on shared VMs that randomly spike TBT, and its simulated Slow-4G network introduces natural variance. Judge results by the median of 3-5 fresh samples with distinct fetchTime values, never a single run, and treat desktop lane failures as a known Google-side issue.