Logo vun Web Performance

Web Performance

Communautéit
nimadorostkar
web-performance

Use when improving page load or runtime performance. Covers Core Web Vitals, bundle and asset optimization, rendering strategy, caching headers, and measuring on real hardware rather than a fast laptop. Trigger on "page loads slowly", "lcp is failing", "bundle is too big", "layout shift on load". Do not use for server load capacity — see the performance-testing skill; for slow queries behind the page, see the database-performance skill.

Iwwersiicht

Editeurnimadorostkar
RepositoryClaude-Skills-collection
Skill-Nummweb-performance
Stären
34
Forks
4
Matgeliwwert Fichieren
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Vum nimadorostkar op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Web Performance an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/frontend/web-performance
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nimadorostkar/Claude-Skills-collection.git /tmp/Claude-Skills-collection
mkdir -p .claude/skills
cp -r /tmp/Claude-Skills-collection/skills/frontend/web-performance .claude/skills/web-performance
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Web Performance an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Web Performance automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Web Performance net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Web Performance

Purpose

Make pages fast on the devices people actually use. Performance work without measurement on representative hardware is guesswork, and it is usually spent on the wrong thing.

When to Use

  • Core Web Vitals failing in field data.
  • A page that feels slow, or a bundle that has quietly grown.
  • Before launching anything that matters commercially.
  • Diagnosing jank, layout shift, or slow interactions.

Capabilities

  • Core Web Vitals: LCP, INP, CLS — diagnosis and remediation.
  • Bundle analysis and code splitting.
  • Image, font, and asset optimization.
  • Caching and CDN header configuration.
  • Runtime profiling: long tasks, layout thrashing, memory growth.

Inputs

  • Field data (Chrome UX Report, RUM), not just a lab score.
  • The bundle, the network waterfall, and a CPU profile.
  • The device and network profile of the actual audience.

Outputs

  • A ranked list of fixes with expected impact.
  • Before/after measurements on throttled hardware.
  • Budgets in CI so the improvement holds.

Workflow

  1. Measure the field, not the lab — Lighthouse on a developer laptop tells you nothing about a mid-range Android on 4G. Start with real-user data and reproduce it with 4x CPU throttling and a Slow 4G profile.
  2. Find the LCP element — It is nearly always a hero image or a heading blocked by a font or a script. Preload it; do not lazy-load it.
  3. Fix INP by breaking up long tasks — Interaction latency comes from the main thread being busy. Find tasks over 50ms in the profile and yield, defer, or move them off-thread.
  4. Fix CLS by reserving space — Every image needs width and height or an aspect-ratio. Every ad slot, embed, and late-loading banner needs a reserved box.
  5. Cut the bundle — Analyze it. One date library, one icon set, or one un-tree-shaken utility library is usually a third of the payload.
  6. Set the cache headers — Immutable, fingerprinted assets get a one-year max-age. HTML gets no-cache and revalidates.
  7. Budget it in CI — Otherwise it regresses within two sprints.

Best Practices

  • Lazy-loading the LCP image makes LCP worse. loading="lazy" belongs below the fold, never above it.
  • font-display: swap prevents invisible text but causes a shift; size-adjust with a matched fallback metric prevents both.
  • Third-party scripts are the largest performance cost in most real applications, and the least examined. Audit them; load them with async, in a worker, or not at all.
  • A 200 KB JavaScript bundle costs far more than a 200 KB image: the image decodes off-thread, the JavaScript must be parsed and executed on the main thread.
  • Preconnect to critical third-party origins, but only two or three — each one costs a connection.
  • Do not optimize what the profile does not show. The bottleneck is rarely where intuition says it is.

Examples

Preloading the LCP image and the font that blocks it:

html
<link rel="preload" as="image"
      href="/hero-960.avif"
      imagesrcset="/hero-640.avif 640w, /hero-960.avif 960w, /hero-1440.avif 1440w"
      imagesizes="(max-width: 768px) 100vw, 960px"
      fetchpriority="high" />

<link rel="preload" as="font" type="font/woff2"
      href="/fonts/inter-var.woff2" crossorigin />

<img src="/hero-960.avif" width="1440" height="810"
     alt="" fetchpriority="high" />   <!-- dimensions reserve space: no CLS -->

Breaking a long task to fix INP:

javascript
// Before: 400ms of blocking work on click. INP is terrible.
button.addEventListener("click", () => {
  const results = items.map(expensiveTransform);   // blocks the main thread
  render(results);
});

// After: yield to the browser between chunks so input stays responsive.
async function processInChunks(items, chunkSize = 50) {
  const out = [];
  for (let i = 0; i < items.length; i += chunkSize) {
    out.push(...items.slice(i, i + chunkSize).map(expensiveTransform));
    await scheduler.yield();   // hand control back; the browser can paint and respond
  }
  return out;
}

Notes

  • INP replaced FID as a Core Web Vital in March 2024. It measures every interaction, not just the first, and it is a far harder bar — most sites that passed FID comfortably do not pass INP.
  • Compression matters more than minification: Brotli at level 11 on a 300 KB bundle typically beats aggressive minification by a wider margin than the minifier does.
  • content-visibility: auto skips rendering work for off-screen content and is close to free on long pages. It is one of the highest-value single-property changes available.

Heefeg gestallte Froen

Wat mécht de KI-Skill Web Performance?

Use when improving page load or runtime performance. Covers Core Web Vitals, bundle and asset optimization, rendering strategy, caching headers, and measuring on real hardware rather than a fast laptop. Trigger on "page loads slowly", "lcp is failing", "bundle is too big", "layout shift on load". Do not use for server load capacity — see the performance-testing skill; for slow queries behind the page, see the database-performance skill.

Firwat Web Performance op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Web Performance besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Web Performance an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/frontend/web-performance an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Web Performance benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Web Performance benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Web Performance domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Web Performance gratis?

Jo. De Skill gëtt vum nimadorostkar ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇