Logo : Frontend Performance

Frontend Performance

Communauté
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.

Présentation

Éditeurnahid-sparktales
Dépôtagent-dispatcher
Nom de la compétencefrontend-performance
Étoiles
58
Forks
5
Fichiers inclus
1
LicenceMIT
Liens
  • Instructions en Markdown

    Un fichier SKILL.md que le modèle charge à la demande : il ne consomme donc des tokens que lorsqu’une demande correspond réellement à la compétence.

  • Compatible avec tous les LLM

    Les compétences IA sont rédigées en Markdown et non sous forme de code propre à un fournisseur. Elles fonctionnent donc avec GPT, Claude, Gemini, Grok ou un modèle local.

  • Fichiers inclus : 1

    Des scripts, des gabarits et des références que le modèle peut consulter pendant son travail. Les fichiers sont en lecture seule et ne sont jamais exécutés.

  • Open source

    Publiée par nahid-sparktales sur GitHub. Consultez les sources avant de l’installer.

Installation

Installez la compétence IA Frontend Performance dans TypingMind pour l’utiliser avec n’importe quel LLM, ou ajoutez-la à un autre agent capable de lire SKILL.md.

1

Installer dans TypingMind

TypingMind installe une compétence directement depuis son dossier GitHub : l’application lit SKILL.md, regroupe les fichiers de ressources et enregistre le tout localement.

  1. Ouvrez l’application et accédez à Plugins → Compétences.
  2. Choisissez « Installer depuis GitHub ».
  3. Copiez l’URL ci-dessous, qui pointe vers le dossier de la compétence, puis collez-la et confirmez.
    https://github.com/nahid-sparktales/agent-dispatcher/tree/main/skills/frontend/frontend-performance
  4. Activez la compétence dans chaque discussion où vous souhaitez pouvoir l’utiliser.
Plugins → Compétences → Ajouter une compétence → Via une URL GitHub, puis collez l’URL du dossier et appuyez sur Continuer.
2

Installer dans un autre agent

Tout agent capable de lire le format Agent Skills peut utiliser cette compétence : copiez le dossier dans le répertoire des compétences de cet 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
Redémarrez Claude Code après la copie pour que la nouvelle compétence soit prise en compte.

Utilisez cette compétence dans TypingMind

Activez Frontend Performance dans n’importe quelle discussion TypingMind et le modèle s’occupe du reste. Le nom et la description de la compétence figurent dans le prompt système. Dès qu’une demande correspond, le modèle charge lui-même l’intégralité des instructions : vous n’avez jamais à l’invoquer manuellement, et elle ne consomme aucun token tant qu’elle n’est pas utilisée.

Le modèle charge automatiquement Frontend Performance dès qu’une demande correspond à cette compétence.

Compatible avec tous les modèles IA

Les compétences IA sont de simples instructions Markdown, et non du code propre à un fournisseur. Ainsi, la compétence Frontend Performance n’est pas liée au modèle pour lequel elle a été conçue. Installez-la une seule fois dans TypingMind et utilisez-la avec GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou un modèle local que vous exécutez vous-même, le tout avec vos propres clés API.

  • Chargée uniquement en cas de besoin

    Le prompt système ne contient que le nom et la description. Les instructions sont récupérées à la première demande correspondante : une compétence inutilisée ne coûte donc rien.

  • Changez de modèle en cours de discussion

    La compétence étant constituée d’instructions et non de code, elle reste fonctionnelle lorsque vous changez de modèle : le nouveau modèle lit le même fichier SKILL.md.

Instructions de la compétence

Voici le contenu de SKILL.md que le modèle charge. Lisez-le avant l’installation : une compétence contient des instructions que votre modèle suivra.

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.

Fichiers inclus

Le modèle lit ces fichiers à la demande lorsque la compétence est chargée. Ils sont accessibles en lecture et ne sont jamais exécutés.

Foire aux questions

À quoi sert la compétence IA 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.

Pourquoi utiliser Frontend Performance sur TypingMind ?

Parce que vous l’installez une seule fois pour l’utiliser avec n’importe quel modèle. Frontend Performance se compose de simples instructions en Markdown plutôt que de code propre à un fournisseur. La même compétence fonctionne donc avec GPT-5, Claude, Gemini, Grok ou un modèle local, et vous pouvez changer de modèle en cours de discussion sans perturber son fonctionnement. TypingMind utilise vos propres clés API : vous payez donc directement les fournisseurs plutôt qu’un abonnement par siège, et vos compétences et discussions restent dans votre propre espace de stockage.

Comment installer Frontend Performance dans TypingMind ?

Dans TypingMind, ouvrez Plugins → Compétences → Installer depuis GitHub et collez https://github.com/nahid-sparktales/agent-dispatcher/tree/main/skills/frontend/frontend-performance. TypingMind lit le fichier SKILL.md, regroupe les fichiers associés et installe le tout sous forme de compétence que vous pouvez activer pour chaque discussion.

Quels modèles d’IA peuvent utiliser Frontend Performance ?

N’importe quel modèle que vous connectez dans TypingMind. Les compétences IA sont de simples instructions en Markdown, et non du code propre à un fournisseur. GPT, Claude, Gemini, Grok et les modèles locaux peuvent donc tous charger cette compétence lorsqu’une demande lui correspond.

Combien de modèles d’IA puis-je utiliser avec Frontend Performance ?

Autant que vous le souhaitez. Vous pouvez utiliser Frontend Performance avec tout modèle qui prend en charge les compétences : GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama et bien d’autres, le tout dans TypingMind avec vos propres clés API.

La compétence IA Frontend Performance est-elle gratuite ?

Oui. Cette compétence est publiée sur GitHub par nahid-sparktales sous licence MIT. Vous ne payez que votre propre fournisseur d’IA pour les tokens utilisés.

Que sont les compétences IA ?

Une compétence IA est un ensemble d’instructions réutilisables qui apprend à un modèle d’IA à accomplir une tâche précise. Elle suit le format ouvert Agent Skills : un fichier SKILL.md contenant un nom et une description, ainsi que les éventuels scripts, gabarits ou fichiers de référence dont le modèle peut avoir besoin. Le modèle ne lit les instructions que lorsque votre demande correspond à la compétence. Une compétence installée ne coûte donc rien tant qu’elle n’est pas utilisée.

En quoi les compétences IA diffèrent-elles des plugins ou des serveurs MCP ?

Un plugin ou un serveur MCP fournit au modèle de nouveaux outils à appeler : du code qui s’exécute quelque part et renvoie un résultat. Une compétence IA lui apporte plutôt des connaissances et une méthode : comment aborder une tâche, quelles étapes suivre et à quoi ressemble un bon résultat. Les compétences sont de simples instructions en Markdown. Elles ne nécessitent donc ni serveur, ni clé API, ni environnement d’exécution, et fonctionnent avec n’importe quel modèle.

Tout voir

Créez votre propre espace de travail IA dès maintenant

Abonnez-vous à notre newsletter pour être informé des nouvelles fonctionnalités et des prochains cadeaux à gagner 👇