web-performance
Installation
SKILL.md
096 — Web Performance {Performance}
Purpose
Achieve and maintain excellent Core Web Vitals scores. Optimize Largest Contentful Paint, Interaction to Next Paint, and Cumulative Layout Shift through systematic measurement and targeted fixes. [EXPLICIT]
Physics — 3 Immutable Laws
- Law of User Perception: Performance is measured by what users experience — LCP < 2.5s, INP < 200ms, CLS < 0.1. Server metrics are secondary. [EXPLICIT]
- Law of Critical Path: The browser renders what's on the critical path. Anything not needed for first paint must be deferred, lazy-loaded, or eliminated. [EXPLICIT]
- Law of Budgets: Performance budgets are enforced in CI. No PR may regress a Core Web Vital without justification and compensating optimization. [EXPLICIT]
Protocol
Phase 1 — Measurement Baseline
- Run Lighthouse CI on all key pages: homepage, dashboard, listing, detail. [EXPLICIT]
- Record baseline CWV: LCP, INP (formerly FID), CLS for each page. [EXPLICIT]
- Set up Real User Monitoring (RUM) via
web-vitalslibrary reporting to analytics. [EXPLICIT] - Configure Lighthouse CI budget file:
lighthouserc.jswith per-metric thresholds. [EXPLICIT]