frontend-performance
Skill
This skill serves as the AI agent's comprehensive framework for diagnosing, analyzing, and resolving any frontend performance challenge — from initial audit through root cause analysis, optimization implementation, and continuous monitoring. The agent should approach performance work empirically: measure first, hypothesize, implement targeted fixes, and verify with data. Every recommendation must be tied to a measurable metric and prioritized by user impact. The agent must resist premature optimization and instead focus effort where measured data indicates the highest return.
Non-Negotiable Lighthouse Default (Apply to every build, every page, every delivered UI)
The agent's default performance target is a Lighthouse score of 95/100 or higher in EVERY category — Performance, Accessibility, Best Practices, and SEO — for every page or interface it produces, alongside smooth, fluid interactions. "Good" Core Web Vitals alone is not enough; the floor is a 95-grade page. This default applies to showcase, marketing, and SaaS UI alike.
- Always verify. After generating or refactoring any frontend, run Lighthouse (or Lighthouse CI) against each delivered page, record all four category scores, and include them in the output. Do not claim completion without the measurement.
- Green means ship. A page is only "done" when Performance, Accessibility, Best Practices, and SEO each report ≥ 95/100 and all Core Web Vitals pass at the stricter 95-grade thresholds defined in Step 4 below.
- Optimize until 95. If any category or Core Web Vital falls below the 95-grade line, apply the relevant optimization steps in this skill (Steps 6–8 for LCP/INP/CLS, Steps 15–20 for assets and rendering, Step 23 for budgets) and re-measure until it passes.
- Stay smooth. Also confirm
prefers-reduced-motionis honored and animations only use GPU-friendly properties (transform/opacity) from Step 27, so the UI is not only 95+ in lab tests but also jank-free in real usage.
When to use
Activate this skill when any of the following conditions are detected: