Logo van Frontend Performance

Frontend Performance

Community
nahid-sparktales
frontend-performance

Make a page measurably faster — pick the metric that is actually bad, measure it under stated conditions, find the real cause, apply the fix that moves that specific metric, re-measure the same way. Use when a page is called slow, when LCP, CLS, INP, TTFB, a Lighthouse score or bundle size is named, when a bundle has grown, or before claiming an optimization worked. Not for backend query or API latency, not for choosing a framework, and not a substitute for checking the page still works afterwards.

Overzicht

Uitgevernahid-sparktales
Repositoryagent-dispatcher
Skillnaamfrontend-performance
Sterren
58
Forks
5
Meegeleverde bestanden
1
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 1

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door nahid-sparktales op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Frontend Performance in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/nahid-sparktales/agent-dispatcher/tree/main/skills/frontend/frontend-performance
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nahid-sparktales/agent-dispatcher.git /tmp/agent-dispatcher
mkdir -p .claude/skills
cp -r /tmp/agent-dispatcher/skills/frontend/frontend-performance .claude/skills/frontend-performance
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Frontend Performance in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Frontend Performance automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Frontend Performance niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Frontend performance

Most frontend performance work fails in one of two ways: optimizing something that was never the bottleneck, or reporting an improvement that was measurement noise. Both are avoided by deciding what to measure before touching anything.

When this fires

A page is reported slow, a Core Web Vital is out of range, a bundle grew, or a change is about to be described as a performance improvement. It does not fire for slowness that traces to a server response or a database query — that is backend work, and the giveaway is a bad TTFB with a fast render once bytes arrive.

What actually gets measured

Three Core Web Vitals, at the 75th percentile of real page loads, segmented by device class:

MetricGoodPoor aboveWhat it is
LCP≤ 2.5s4.0sWhen the largest content element finishes rendering
CLS≤ 0.10.25Unexpected layout movement over the page's life
INP≤ 200ms500msWorst-case latency from an interaction to its next paint

TTFB and FCP are diagnostics, not Core Web Vitals — useful for locating a cause, not for grading. Bundle size is not a Core Web Vital at all. It is an input that mostly reaches INP (parse, compile and execute time on the main thread) and reaches LCP only when script blocks the render.

Procedure

  1. State the metric and the segment. "The site is slow" is not a target. "Mobile LCP on the product page is 4.1s at p75" is. Without a segment you will optimize desktop and ship nothing.
  2. Prefer field data over lab data for the diagnosis. Real users on real devices and networks are what the metric is defined over. Lab tools cannot produce a real INP or a full-session CLS, because both depend on what a user did. If there is no field data, say the diagnosis is lab-only and treat it as a hypothesis.
  3. Fix the lab conditions and write them down before the first run: production build (never a dev server — unminified code and HMR make the numbers meaningless), mobile emulation with CPU and network throttling, cold cache, no extensions, one page at a time.
  4. Run it more than once. Take the median of five, not one run. A single lab number cannot tell a 15% win from ordinary variance, and most reported wins are inside that band.
  5. Identify the specific offender, not the category. For LCP, name the element the browser actually chose. For CLS, name the node that moved and what pushed it. For INP, capture the interaction and find the long task. A fix aimed at a category rather than an element is a guess.
  6. Apply the fix that moves that metric — see the table below. One change at a time; batched changes cannot be attributed, and one of them is usually a regression hiding behind the others.
  7. Re-measure with the identical method from step 3: same build type, same throttling, same number of runs, same page. Comparing a fresh measurement to a remembered one proves nothing.
  8. Check the page still works. An optimization that defers, lazy-loads or splits something can break rendering or interaction. Run rendered verification before calling it done.
  9. Report before and after with the conditions attached. A number without its conditions is not a measurement.

Which fix moves which metric

  • LCP — the LCP element is usually a hero image or a headline block. Serve it at the right size and format; do not lazy-load it; raise its fetch priority and preload it if discovery is late; remove render-blocking CSS and script ahead of it; inline the critical styles it needs. If TTFB is the bulk of LCP, the fix is caching, CDN or server render cost — nothing in the client will help.
  • CLS — reserve space before content arrives: explicit dimensions or an aspect ratio on every image, video, iframe, ad slot and embed; a fixed height for banners and late-injected content; never insert above existing content after paint. Web fonts shift text when the fallback has different metrics — match the fallback's metrics rather than removing the font. Animate transform and opacity, not properties that trigger layout.
  • INP — this is main-thread contention during an interaction. Break up long tasks and yield between them; do less work in the event handler; cut the re-render the interaction triggers; defer or remove third-party scripts competing for the thread. Shipping less JavaScript helps here, which is the only place bundle work reliably shows up.
  • TTFB — server, cache and redirect chains. Frontend changes do not move it.
  • Bundle weight — build with source maps, read the treemap your bundler's analyzer produces, and go after the largest single contributors: a whole library imported for one function, a date or icon package pulled in entirely, a polyfill set for browsers you do not support, a duplicated dependency at two versions. Route-level code splitting is the structural fix; it shrinks the initial payload without deleting features. Measure bundle size on the built output, not on dependency counts.

Two traps worth naming: a smaller bundle with an unchanged LCP element does not improve LCP, and a better Lighthouse score is not a better experience — the score is a weighted lab composite, and it can rise while the metric a user feels stays flat.

Checklist

  • The target metric and the device segment are named, not "slow"
  • Field data consulted, or the diagnosis explicitly marked lab-only
  • Measured on a production build under written-down throttling conditions
  • Median of multiple runs, not a single number
  • The specific LCP element / shifting node / long task identified before any fix
  • One change at a time, each re-measured by the same method
  • Rendered behaviour re-checked after the optimization
  • Conditions reported alongside both numbers

Failure handling

  • The numbers move but the metric does not — the thing you optimized was not the bottleneck. Revert it rather than keeping an unattributed change, and go back to step 5.
  • Before and after are within noise — report it as no measured change. A 5% lab delta over five runs is not a result, and claiming it burns the credibility of the real wins.
  • The bottleneck is a third-party script you do not control — say so, quantify its cost, and offer the options that exist (defer it, load it on interaction, drop it). Removing a vendor's tag is a product decision: surface it, do not make it.
  • Field data exists and disagrees with the lab — the field data is the metric. The lab is a reproduction of one device on one network.
  • No measurement tooling is available — do not estimate. Name the likely causes as hypotheses, say nothing was measured, and never report an unmeasured change as an improvement.
  • The fix requires a deploy to observe (CDN, cache headers, edge config) — stop and ask before deploying anything. Field data only updates after real traffic, so a same-day field comparison is not available and should not be implied.

Evidence to report

The metric and segment targeted; the measurement conditions verbatim (build type, throttling, run count); the before and after values from those runs; the specific element, node or task identified as the cause; the one change made; the bundle treemap before and after when bundle work was part of it; and what remains unmeasured — including whether real-user data has confirmed anything yet. "Improved performance" with no conditions and no numbers is not evidence.

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Frontend Performance?

Make a page measurably faster — pick the metric that is actually bad, measure it under stated conditions, find the real cause, apply the fix that moves that specific metric, re-measure the same way. Use when a page is called slow, when LCP, CLS, INP, TTFB, a Lighthouse score or bundle size is named, when a bundle has grown, or before claiming an optimization worked. Not for backend query or API latency, not for choosing a framework, and not a substitute for checking the page still works afterwards.

Waarom Frontend Performance gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Frontend Performance bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Frontend Performance in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/nahid-sparktales/agent-dispatcher/tree/main/skills/frontend/frontend-performance. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Frontend Performance gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Frontend Performance gebruiken?

Zoveel als je wilt. Je kunt Frontend Performance gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Frontend Performance gratis?

Ja. Deze skill is door nahid-sparktales op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇