Skip to content
Skills Library
Programming · Review & audit

web-performance

/web-performance

Diagnoses and fixes Core Web Vitals - LCP, INP, and CLS - through an ordered audit procedure with concrete code-level changes for images, fonts, JavaScript, and third-party scripts. Use when someone asks "why is my page slow", "how do I fix my LCP", "we're failing Core Web Vitals", "improve my Lighthouse score", or wants a frontend performance audit before a launch or SEO push. Do NOT use for testing server capacity under concurrent traffic - use load-testing instead; for native mobile app performance, use mobile-perf-profiler; for Next.js-on-Vercel-specific tuning, use next-on-vercel-perf.

Repository
skills ↗
Licence
MIT
Last repository change
13.10.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
0
Deprecation

No signals detected. Repository changed on 13.10.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 fixes Core Web Vitals - LCP, INP, and CLS - through an ordered audit procedure with concrete code-level changes for images, fonts, JavaScript, and third-party scripts. Use when someone asks "why is my page slow", "how do I fix my LCP", "we're failing Core Web Vitals", "improve my Lighthouse score", or wants a frontend performance audit before a launch or SEO push. Do NOT use for testing server capacity under concurrent traffic - use load-testing instead; for native mobile app performance, use mobile-perf-profiler; for Next.js-on-Vercel-specific tuning, use next-on-vercel-perf.

Triggers from the description

why is my page slowhow do I fix my LCPre failing Core Web Vitalsimprove my Lighthouse score
Original author description

Diagnoses and fixes Core Web Vitals - LCP, INP, and CLS - through an ordered audit procedure with concrete code-level changes for images, fonts, JavaScript, and third-party scripts. Use when someone asks "why is my page slow", "how do I fix my LCP", "we're failing Core Web Vitals", "improve my Lighthouse score", or wants a frontend performance audit before a launch or SEO push. Do NOT use for testing server capacity under concurrent traffic - use load-testing instead; for native mobile app performance, use mobile-perf-profiler; for Next.js-on-Vercel-specific tuning, use next-on-vercel-perf.

How it works

  1. Operating procedure
  2. Worked artifact: the hero image, bad vs good
  3. Edge cases
  4. Deliverable
  5. Do NOT
  6. Quality bar
  7. Escalation
Original SKILL.md headings · 108 lines, 1,004 words
SKILL.md preview
---
name: web-performance
description: Diagnoses and fixes Core Web Vitals - LCP, INP, and CLS - through an ordered audit procedure with concrete code-level changes for images, fonts, JavaScript, and third-party scripts. Use when someone asks "why is my page slow", "how do I fix my LCP", "we're failing Core Web Vitals", "improve my Lighthouse score", or wants a frontend performance audit before a launch or SEO push. Do NOT use for testing server capacity under concurrent traffic - use load-testing instead; for native mobile app performance, use mobile-perf-profiler; for Next.js-on-Vercel-specific tuning, use next-on-vercel-perf.
metadata:
  title: "Web Performance"
---

# Web Performance

Pages get optimized for the developer's laptop and fail for the median user on a mid-tier phone over 4G - that is the costly mistake this skill prevents. The outcome is passing Core Web Vitals at the 75th percentile of real users: LCP under 2.5s, INP under 200ms, CLS under 0.1. Everything below is ordered so measurement decides where effort goes, because intuition about performance is wrong more often than it is right.

## Operating procedure

Run the audit in this order. Fixing before measuring wastes effort on metrics that already pass; measuring in the lab before checking field data optimizes for a synthetic user who does not exist.

### Step 1: Gather inputs

- The URL(s) or page templates that matter commercially (home, landing, product, checkout). Default: the highest-traffic template.
- Field data access: CrUX (public per-origin) or in-house RUM. If neither exists, note that lab data is a proxy and label conclusions accordingly.
- Framework and rendering mode (SSR, SSG, SPA, islands), CDN in use, and the third-party tag list.
- The audience's device and network profile. Default when unknown: mid-tier Android over 4G - never a desktop on fiber.

### Step 2: Read field data first

Use field data (CrUX, RUM) for what users actually experience; lab data (Lighthouse, WebPageTest) only to debug. Read LCP, INP, and CLS at the 75th percentile. Passing bands: LCP under 2.5s, INP under 200ms, CLS under 0.1. Needs-improvement bands: LCP 2.5-4s, INP 200-500ms, CLS 0.1-0.25; anything beyond those is failing. The failing metric - not the loudest complaint - selects which playbook below to run.

### Step 3: Reproduce in the lab under throttling

Profile on a throttled mid-tier phone profile and 4G - not the development laptop. Identify the LCP element, the longest main-thread tasks, and the layout-shift sources before changing anything.

### Step 4: Run the playbook for the failing metric

Fix the worst-failing metric first, one change at a time.

LCP (target under 2.5s):
- Identify the LCP element (usually the hero image or headline).
- Preload it: link rel="preload" as="image" with fetchpriority="high".
- Serve AVIF/WebP, correctly sized via srcset and sizes.
- Eliminate render-blocking CSS/JS; inline critical CSS, defer the rest.
- Use a CDN and long cache headers; reduce TTFB with server caching - TTFB above roughly 800ms makes 2.5s LCP nearly unreachable.

CLS (target under 0.1):
- Set explicit width/height (or aspect-ratio) on images, videos, and iframes.
- Reserve space for ads, embeds, and late-loading banners.
- Load web fonts with font-display: swap and preload the primary font.
- Never insert content above existing content after load.

INP (target under 200ms):
- Break long tasks (over 50ms) with scheduler.yield() or chunking.
- Defer non-critical JS; remove unused third-party scripts.
- Debounce expensive handlers; move heavy work to a Web Worker.
- Use CSS for animation instead of JS where possible.

### Step 5: Apply the standing rules

- Ship less JavaScript - it is the dominant cost. Code-split per route.
- Lazy-load below-the-fold images with loading="lazy" (never the LCP image).
- Audit third parties; each tag adds main-thread cost and risk. Anything not paying for itself in revenue or insight gets removed, not deferred.
- Re-measure after every change; do not trust intuition or ship batched changes that cannot be attributed.

### Step 6: Verify in the field

Lab confirmation is necessary but not sufficient. Confirm the p75 field metric moved over a full collection window before declaring the fix done.

## Worked artifact: the hero image, bad vs good

Bad - invisible to the preload scanner, unsized, blocking script:

```html
<div class="hero" style="background-image:url(hero.jpg)"></div>
<script src="analytics.js"></script>
```

Good - discoverable, prioritized, sized, deferred:

```html
<link rel="preload" as="image" href="hero.webp" fetchpriority="high">
<img src="hero.webp" width="1200" height="630" fetchpriority="high" alt="Product dashboard">
<script src="analytics.js" defer></script>
```

The bad version hides the LCP image from the browser's preload scanner (background-image is only discovered after CSS parses), gives the layout engine no dimensions (CLS), and blocks parsing on analytics. The good version typically moves LCP by hundreds of milliseconds on 4G from the preload and priority hints alone.

## Edge cases

- SPA route changes: instrument soft navigations; Core Web Vitals accounts for them.
- Hydration cost: prefer streaming SSR and islands to reduce main-thread blocking.
- Cache busting: hash filenames and set long max-age with immutable on static assets.

## Deliverable

Produce a performance audit containing: current p75 field values for LCP, INP, and CLS against the 2.5s/200ms/0.1 budgets; the identified LCP element and top main-thread offenders; a ranked fix list where each item names the metric it moves, the specific code change, and the expected direction of impact; and a re-measurement plan (lab check per change, field confirmation at p75 over a full window).

## Do NOT

- Do not optimize from a Lighthouse score alone - lab data on a fast machine routinely passes while p75 field data fails.
- Do not test on the development laptop; the median user is on a mid-tier phone over 4G.
- Do not lazy-load the LCP image - it adds a full request-discovery delay to the one image that matters most.
- Do not chase a perfect score on a metric already passing while another fails; the failing metric sets the agenda.
- Do not ship five changes at once - attribution dies and regressions hide.
- Do not add a third-party tag manager to "manage" performance; every tag is main-thread cost.

## Quality bar

- Every claim of improvement cites a before/after measurement, lab and field.
- The audit names the specific LCP element and the specific long tasks, not "images are slow".
- Every recommended change maps to exactly one metric and one budget.
- The device/network profile used for lab testing is stated in the report.
- p75 field data confirms the fix before it is declared done.

## Escalation

If the bottleneck is server capacity under concurrency rather than client rendering, route to load-testing. Backend query time dominating TTFB belongs with sql-query-optimizer or caching-strategy. Native app jank belongs with mobile-perf-profiler.

Versions

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

Database snapshot: 13.11.2026 · package version 13a4f4d432ac (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

  • 100next-on-vercel-perf
    Diagnose and fix Core Web Vitals and page performance of a Next.js app on Vercel - measurement-first. Use when an LCP/INP/CLS score is bad, a page \"feels slow\", Lighthouse/PageSpeed/Speed Insights is red, the JS bundle is too big, images or fonts are janky, or you want…
  • 100core-web-vitals
    Optimize Core Web Vitals (LCP, INP, CLS) for better page experience and search ranking. Use when asked to "improve Core Web Vitals", "fix LCP", "reduce CLS", "optimize INP", "page experience optimization", or "fix layout shifts". Focuses specifically on the three Core Web Vitals…
  • 100page-audit
    Measure every page with Lighthouse (accessibility, SEO, best practices) and a Core Web Vitals trace (LCP, CLS, INP), record the results in docs/lighthouse/, then fix what they find. Use when the user asks for an accessibility, a11y, SEO, Lighthouse, performance, page-speed, or Core Web Vitals audit.
  • 90web-quality
    Web quality optimization skills based on Google Lighthouse guidelines and Core Web Vitals. Use when asked to audit web quality, optimize performance, improve accessibility, fix SEO, apply best practices, or analyze Core Web Vitals (LCP, INP, CLS).
  • 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,…
  • 100core-web-vitals
    Optimize Core Web Vitals (LCP, INP, CLS) for better page experience and search ranking. Use when asked to "improve Core Web Vitals", "fix LCP", "reduce CLS", "optimize INP", "page experience optimization", or "fix layout shifts".

Feedback and reports

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