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.
- Lighthouse and Core Web Vitals modules for score interpretation, lab-vs-field context, and LCP, INP, and CLS targets.
- LCP, image, font, and CSS modules for first paint and critical rendering path work.
- INP, JavaScript, and third-party modules for long tasks, hydration, bundles, tags, and user interaction cost.
- CLS, caching, and edge-delivery modules for stable layout and production delivery behavior.
- Accessibility, SEO, and verification modules so performance fixes do not break crawlability, semantics, budgets, or release checks.
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.