Skip to content
Skills Library
Programming · Analysis

web-performance

/web-performance

Diagnoses and improves web performance and Core Web Vitals (LCP, INP, CLS) by measuring first with Lighthouse and bundle analysis, then applying targeted fixes for images, JavaScript size, rendering, fonts, caching and server response time. Use when the user says a site is slow, asks to improve Lighthouse or PageSpeed scores, Core Web Vitals, bundle size, load time or responsiveness.

Repository
skillforge ↗
Licence
MIT
Last repository change
09.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
2
Deprecation

No signals detected. Repository changed on 09.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Diagnoses and improves web performance and Core Web Vitals (LCP, INP, CLS) by measuring first with Lighthouse and bundle analysis, then applying targeted fixes for images, JavaScript size, rendering, fonts, caching and server response time. Use when the user says a site is slow, asks to improve Lighthouse or PageSpeed scores, Core Web Vitals, bundle size, load time or responsiveness.

Original author description

Diagnoses and improves web performance and Core Web Vitals (LCP, INP, CLS) by measuring first with Lighthouse and bundle analysis, then applying targeted fixes for images, JavaScript size, rendering, fonts, caching and server response time. Use when the user says a site is slow, asks to improve Lighthouse or PageSpeed scores, Core Web Vitals, bundle size, load time or responsiveness.

How it works

  1. 1. Measure
  2. 2. Fix by metric
  3. 3. Always-good hygiene
  4. 4. Report
Original SKILL.md headings · 63 lines, 497 words
SKILL.md preview
---
name: web-performance
description: Diagnoses and improves web performance and Core Web Vitals (LCP, INP, CLS) by measuring first with Lighthouse and bundle analysis, then applying targeted fixes for images, JavaScript size, rendering, fonts, caching and server response time. Use when the user says a site is slow, asks to improve Lighthouse or PageSpeed scores, Core Web Vitals, bundle size, load time or responsiveness.
---

# Web Performance

**Measure → find the biggest bottleneck → fix → measure again.** Never optimize blind.

## 1. Measure
```bash
npx lighthouse https://localhost:3000 --preset=desktop --view
npx lighthouse https://localhost:3000 --form-factor=mobile --throttling-method=simulate --view
```
- Test a **production build** (`npm run build && npm run start`), never the dev server.
- Real-user data beats lab data: check CrUX/PageSpeed Insights for public sites, or the `web-vitals` library in the app.
- Bundle analysis: `npx vite-bundle-visualizer`, `@next/bundle-analyzer`, `webpack-bundle-analyzer`, or `npx source-map-explorer dist/**/*.js`.

Targets (75th percentile, mobile):

| Metric | Good | What it measures |
|---|---|---|
| **LCP** | ≤ 2.5 s | When the main content appears |
| **INP** | ≤ 200 ms | How fast the page responds to input |
| **CLS** | ≤ 0.1 | How much the layout jumps |
| TTFB | ≤ 0.8 s | Server/CDN response time |

## 2. Fix by metric

### LCP (slow main content)
- Identify the LCP element (Lighthouse names it). Usually a hero image or heading.
- Hero image: modern format (AVIF/WebP), correct dimensions with `srcset`/`sizes`, `fetchpriority="high"`, **not** `loading="lazy"`; `<link rel="preload">` if discovered late (CSS background, JS-rendered).
- Remove render-blocking resources: inline critical CSS, `defer` scripts, load third-party scripts after interaction or with `async`.
- Slow TTFB: cache at the CDN/edge, SSG/ISR for static content, fix slow DB queries, enable compression (Brotli).
- Client-rendered pages: SSR or prerender the above-the-fold content.

### INP (sluggish interactions)
- Find long tasks (> 50 ms) in the Performance panel. Break them up (`await scheduler.yield()` or `setTimeout` chunks), move heavy work to a Web Worker.
- Ship less JS: code-split routes and heavy components (`import()`, `React.lazy`), remove unused dependencies, replace heavy libraries (moment → date-fns/Temporal, lodash → native).
- Avoid unnecessary re-renders (memoization, state colocation, virtualization for long lists).
- Debounce expensive input handlers; give immediate visual feedback before heavy work.

### CLS (layout shift)
- Always set `width`/`height` (or `aspect-ratio`) on images, videos, iframes and ad slots.
- Reserve space for late content (banners, embeds, skeletons with fixed size).
- Fonts: `font-display: swap` (or `optional`) + `size-adjust`/fallback metric overrides; preload the critical font file; self-host and subset.
- Animate `transform`/`opacity`, never `top`/`height`.

## 3. Always-good hygiene
- Long-lived cache headers for hashed assets (`Cache-Control: public, max-age=31536000, immutable`), short for HTML.
- HTTP/2 or HTTP/3, Brotli compression, a CDN.
- `loading="lazy"` for below-the-fold images and iframes; `preconnect` to critical third-party origins.
- Set a **performance budget** in CI (Lighthouse CI or `size-limit`) so regressions fail the build.

## 4. Report
```markdown
| Metric | Before | After | Target |
|---|---|---|---|
| LCP (mobile) | 4.1 s | 2.2 s | ≤ 2.5 s |
| JS shipped | 612 KB | 288 KB | — |

Changes (highest impact first):
1. Hero image → AVIF + fetchpriority (−1.4 s LCP)
2. Lazy-loaded chart library on dashboard route (−260 KB JS)
```
Show measured numbers from real runs only. Lab scores vary between runs; take the median of 3–5.

Versions

RepositoryScoreLicence
This page · meyshad/skillforge100MIT
fusengine/agents100MIT
wrongstack/wrongstack100MIT
nimadorostkar/Claude-Skills-collection100MIT
sharabarinillia/SEO-GEO-Vercel-Playbook-Skill100MIT
KILN-skills/kiln100MIT
ziniman/ai-instruct100Apache-2.0
reddygopalkrishna/developer-agent-skills100MIT
SkillMedev/skills100MIT

Database snapshot: 13.11.2026 · package version 347d5eb2bba9 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100core-web-vitals-fixer
    Diagnoses Core Web Vitals by page template with PageSpeed Insights and Lighthouse on your top Search Console pages, and writes ranked LCP, INP and CLS fix plans plus image and script bloat findings. Use when a site is slow, to pass Core Web Vitals, fix LCP, CLS or INP, or for a weekly speed check.
  • 100performance
    Performance optimization for Next.js — bundle analysis, Core Web Vitals (LCP/CLS/INP), SSR streaming, code splitting, memory leaks, caching strategies, Lighthouse CI. Use when optimizing page speed, debugging slow renders, reducing bundle size, or setting up performance budgets.
  • 100performance-optimization
    Diagnose and fix web performance issues including Core Web Vitals (LCP, INP, CLS), bundle size, asset optimization, render performance, and runtime efficiency. Use this skill whenever the user wants to improve page speed, fix Core Web Vitals, optimize assets, reduce bundle size,…
  • 100website-performance
    Improve website speed and Google PageSpeed / Core Web Vitals scores (LCP, TBT/INP, CLS, FCP) without changing the look. Use when the user mentions PageSpeed, Lighthouse, slow pages, mobile score, Core Web Vitals, or heavy scripts.
  • 100core-web-vitals-check
    Check Core Web Vitals (LCP, INP, CLS) from real Chrome visitors and the Lighthouse performance score for a list of pages or a whole sitemap, through Google PageSpeed Insights. Use when the user asks "check my Core Web Vitals", "PageSpeed test these pages", "why is my site slow…
  • 100web-vitals-analyzer
    Analyze and optimize Core Web Vitals (LCP, CLS, INP) and frontend performance. Use when a user asks to improve page speed, fix layout shifts, reduce loading times, analyze Lighthouse reports, optimize bundle size, or improve Google PageSpeed scores. Covers image optimization,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.