Audit, diagnose, or optimize website loading and interaction performance, Core Web Vitals, and Lighthouse performance scores.
Imported from cloudflare/skills @ ff191de · original author: Cloudflare · license Apache-2.0. Unmodified copy, shared under its license; not affiliated with or endorsed by the original author.
If trace returns empty or fails, verify the page loaded correctly with navigate_page first
If insight names don't match, inspect the trace response to list available insights
Phase 2: Core Web Vitals Analysis
Use performance_analyze_insight to extract key metrics.
Note: Insight names may vary across Chrome DevTools versions. If an insight name doesn't work, check the insightSetId from the trace response to discover available insights.
Common insight names:
Metric
Insight Name
What to Look For
LCP
LCPBreakdown
Time to largest contentful paint; breakdown of TTFB, resource load, render delay
CLS
CLSCulprits
Elements causing layout shifts (images without dimensions, injected content, font swaps)
Caching issues: Missing or weak Cache-Control, ETag, or Last-Modified headers
Large payloads: Uncompressed or oversized JS/CSS bundles
Unused preconnects: If flagged, verify by checking if ANY requests went to that origin. If zero requests, it's definitively unused—recommend removal. If requests exist but loaded late, the preconnect may still be valuable.
For detailed request info:
get_network_request(reqid: <id>)
Phase 4: Accessibility Snapshot
Take an accessibility tree snapshot:
take_snapshot(verbose: true)
Flag high-level gaps:
Missing or duplicate ARIA IDs
Elements with poor contrast ratios (check against WCAG AA: 4.5:1 for normal text, 3:1 for large text)
Focus traps or missing focus indicators
Interactive elements without accessible names
Phase 5: Codebase Analysis
Skip if auditing a third-party site without codebase access.
Analyze the codebase to understand where improvements can be made.
Detect Framework & Bundler
Search for configuration files to identify the stack:
Tool
Config Files
Webpack
webpack.config.js, webpack.*.js
Vite
vite.config.js, vite.config.ts
Rollup
rollup.config.js, rollup.config.mjs
esbuild
esbuild.config.js, build scripts with esbuild
Parcel
.parcelrc, package.json (parcel field)
Next.js
next.config.js, next.config.mjs
Nuxt
nuxt.config.js, nuxt.config.ts
SvelteKit
svelte.config.js
Astro
astro.config.mjs
Also check package.json for framework dependencies and build scripts.
Tree-Shaking & Dead Code
Webpack: Check for mode: 'production', sideEffects in package.json, usedExports optimization
Vite/Rollup: Tree-shaking enabled by default; check for treeshake options