AI Performance ยท June 21, 2026

Getting Lighthouse scores green with cascaded AI performance skills

A slow page is rarely one problem. Lighthouse might point to LCP, JavaScript, image weight, layout shifts, cache headers, third-party scripts, or verification gaps. Treating all of that as one prompt makes performance work harder to audit.

We built web-performance-skill-cascade to give AI coding agents a more useful shape: a small root skill plus focused modules that load only when the task needs them.

The cascade

The root skill gives the agent the operating rule: measure the page or report, load the relevant modules, patch narrowly, preserve accessibility and SEO, rerun the smallest useful check, and report residual lab-vs-field risk.

Diagram showing a page, pull request, or Lighthouse report flowing into the web-performance root skill, then conditional Lighthouse, Core Web Vitals, LCP, images, fonts, INP, JavaScript, third-party, CLS, caching, and delivery modules, ending in patch, verify, and residual risk output.
The root skill stays small; focused modules load only when the task touches that performance surface.

Why this is easier to trust

Performance prompts become fragile when they ask an agent to remember every rule at once. A modular system makes the work easier to review: update the LCP module when hero image guidance changes, update the JavaScript module when bundle policy changes, and update the verification module when budgets mature.

The project also includes deterministic scripts. It can parse a Lighthouse JSON report into a prioritized Markdown plan, compose scenario-specific prompts, generate a green-target Lighthouse CI-style budget, and validate every module and demo from a clean clone.

What we released

The first release includes a Codex skill, a portable Markdown bundle, twelve performance modules, six scenario fixtures, six before/after performance patch demos, a Mirogate Lighthouse dogfood fixture, validation scripts, and tests.

npm test
node scripts/analyze.mjs --report examples/lighthouse/mirogate-uae-mobile.json
node scripts/compose.mjs --scenario landing-page-lcp
node scripts/budget.mjs --init --target green --stdout

The source is available at github.com/mirogate/web-performance-skill-cascade.

This is not a promise of perfect Lighthouse scores or SEO ranking improvement. It is a practical skill architecture for making AI-assisted performance work more measurable, scoped, and honest about what remains out of scope.