Skip to content

/performance-audit

Framework-aware Core Web Vitals Generates reports

A comprehensive web performance audit focused on Core Web Vitals (LCP, CLS, INP) and the code patterns that cause them to fail. Run it in any project and Claude audits your bundle, images, fonts, third-party scripts, and caching strategy — then generates an actionable developer report and a plain-English stakeholder report.


/performance-audit

To generate reports without applying fixes:

/performance-audit audit only

PhaseWhat Claude checks
1 — JS bundleOversized dependencies (moment vs dayjs, full lodash vs tree-shaken), duplicate libraries, heavy client-side imports in server components, missing dynamic imports for large below-fold components, "use client" boundaries too high in the tree
2 — ImagesFormat (AVIF/WebP vs PNG for photos), rendered size vs intrinsic size, loading="lazy" on below-fold images, priority/fetchpriority="high" on the LCP image, explicit width/height for CLS prevention, sizes prop on responsive images
3 — Fontsfont-display: swap, subsetting, self-hosting via next/font or @fontsource vs external CDN, font preloading, number of font files
4 — Third-party scriptsLoading strategy (defer/async/lazyOnload), render-blocking scripts in <head>, video embed facades, tag manager payload risk
5 — Core Web Vitals patternsLCP: hero image lazy-loading, render-blocking resources, fade-in animations on LCP element. CLS: images without dimensions, font swap shift, dynamic content inserted above existing. INP: heavy event handlers, expensive useEffect on interaction, unnecessary re-renders
6 — Caching & headersStatic assets with hashed filenames should have max-age=31536000, immutable. HTML pages should not be long-cached. API routes should have no-store unless explicitly cacheable.

reports/performance-audit-YYYY-MM-DD.html

  • Framework and deployment target summary
  • Core Web Vitals patterns: LCP, CLS, INP — Pass / Warning / Fail per pattern
  • Bundle analysis: large chunks, unnecessary dependencies, missing code-splitting
  • Image violation table: file, issue, fix
  • Font loading issues and fixes
  • Third-party script table: name, loading strategy, blocking status, recommendation
  • Caching gaps: asset type, current header, recommended header
  • Per-issue: severity (Critical / High / Medium / Low), file path, problem code, recommended fix

When not in “audit only” mode, the command automatically applies:

  • loading="lazy" added to below-fold images
  • priority / fetchpriority="high" added to the LCP image
  • Explicit width and height added to images missing them (prevents CLS)
  • strategy="lazyOnload" applied to non-critical third-party scripts
  • momentdayjs migration if moment is found (updates all imports)
  • Dynamic imports added for large below-fold components
  • font-display: swap added to custom font declarations
  • Recommended cache headers added to next.config.js or vercel.json

Does not automatically:

  • Remove third-party scripts (asks first)
  • Change image formats (flags with recommendation)
  • Split large bundles (flags with architectural recommendation)

MetricGoodNeeds improvementPoor
LCP (Largest Contentful Paint)< 2.5s2.5–4s> 4s
CLS (Cumulative Layout Shift)< 0.10.1–0.25> 0.25
INP (Interaction to Next Paint)< 200ms200–500ms> 500ms

FrameworkNotes
Next.js App Router✅ Full support — checks next/image, next/font, <Script>, RSC boundaries
Next.js Pages Router✅ Full support
Nuxt 3✅ Full support — checks nuxt/image, useHead fonts
SvelteKit✅ Full support
Astro✅ Full support — checks Astro <Image>, island boundaries
Vite / CRA✅ Full support — bundle + image analysis

Terminal window
git clone https://github.com/Oladiman/iron-scrolls.git
cd iron-scrolls
bash install.sh

View raw command source →

If these scrolls have served you well —
☕ Support on Ko-fi ♥ GitHub Sponsors