| name | web-performance |
| description | PageSpeed and Core Web Vitals checklist for web projects. Use when building UI, shipping a page, reviewing front-end code, or running /audit-code or /beautify on a web target. |
Web Performance Skill
Reference checklist for web performance: PageSpeed Insights score and Google Core Web Vitals. The
standard is non-negotiable for production web pages: PageSpeed >= 90/100 on mobile, all Core
Web Vitals in the green on real-user data.
When to use this skill
- Before merging any branch that ships or modifies a public web page.
- When running
/audit-code, /beautify, /feature, or /fix on a web target.
- When the user asks "is this fast enough?", "what's the LCP?", or mentions PageSpeed/Lighthouse.
- When designing or reviewing UI that affects layout, images, fonts, scripts, or third-party tags.
How this skill is used
Users do not invoke skills directly. Skills are reference knowledge that the AI loads
automatically when it detects a matching task, or when a command explicitly says "use the
web-performance skill."
- Automatic: The AI loads this skill when working on web pages, UI, or front-end perf.
- Referenced by:
/audit-code, /beautify -- these commands include a performance
validation step that uses this skill's checklist.
Targets (non-negotiable for production web)
| Metric | Target (mobile, p75 field) | Notes |
|---|
| PageSpeed score | >= 90 / 100 | Lighthouse mobile run |
| LCP | <= 2.5 s | Largest Contentful Paint |
| INP | <= 200 ms | Interaction to Next Paint (replaced FID) |
| CLS | <= 0.1 | Cumulative Layout Shift |
| FCP | <= 1.8 s | First Contentful Paint |
| TTFB | <= 800 ms | Time To First Byte |
| Total Blocking Time | <= 200 ms | Lab metric, proxy for INP |
If a page falls below any target, treat it as a release blocker until justified or fixed.
Checklist
1. Largest Contentful Paint (LCP)
2. Interaction to Next Paint (INP)
3. Cumulative Layout Shift (CLS)
4. JavaScript and bundles
5. Images and media
6. Fonts
7. Network and caching
8. Third parties
9. Accessibility intersects performance
How to measure
-
Lab (during development):
- Run Lighthouse in Chrome DevTools (mobile preset, throttled CPU + network).
- Or
npx lighthouse <url> --preset=desktop / --preset=perf from CLI.
- Or PageSpeed Insights: https://pagespeed.web.dev/
-
Field (real users, p75):
- Google Chrome UX Report (CrUX) via PageSpeed Insights.
- Or
web-vitals JS library streaming to your analytics.
- Or Vercel / Cloudflare / New Relic real-user monitoring.
-
Continuous:
- Add Lighthouse CI to the pipeline (assertions on score and metrics).
- Track perf budget in CI; fail the build on regression.
Report format
After running the checklist, structure findings as:
| Metric | Lab value | Field value | Target | Status |
|---|
| PageSpeed | 78 | n/a | >= 90 | RED |
| LCP | 3.2 s | 2.9 s | 2.5 s | RED |
| INP | 180 ms | 160 ms | 200 ms | GREEN |
| CLS | 0.05 | 0.04 | 0.1 | GREEN |
Then list violations grouped by severity:
- Blocker -- any Core Web Vital in the red on field data.
- High -- PageSpeed score < 90, lab metric in the red.
- Medium -- Single optimization missing (e.g. image not in AVIF) but metrics still green.
- Low -- Style / hygiene (e.g. unused font weight).
- Positive -- Patterns worth keeping.
For each finding: file path, root cause, suggested fix, expected metric impact.
Common root causes
- Hero image not preloaded or served too large.
- Render-blocking CSS / fonts on the critical path.
- A single heavy third-party script (chat, analytics, A/B tester).
- Hydration of an entire SPA when an SSR snapshot would suffice.
- Unbounded list rendering (no virtualization).
- Layout shift from late-arriving banners, ads, or web fonts.
- Forgotten
width/height on images.