frontend-performance
Skill31 starsChanged 18 days agoMITView on GitHub
Use when defining, implementing, or auditing frontend performance for web apps and SaaS frontends; produces a per-flow performance budget, measurement plan tied to SLOs, and CI regression gate. Use api-design-first for API shape and observability-monitoring for server SLOs.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- MartinOlivero/saas-buildertheir own version, first seen Oct 13, 2026
- nahid-sparktales/agent-dispatchertheir own version, first seen Sep 21, 2026
- bestdeejay-design/agent-skillstheir own version, first seen Aug 9, 2026
- shreyas-makes/agent-skillstheir own version, first seen Jul 15, 2026
- miptah21/skillstheir own version, first seen May 26, 2026
- basidiocarp/pileustheir own version, first seen May 25, 2026
Used with
Projects with it also use accessibility.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
ElasticSkillaccessibility
Accessibility guidance for Kibana. Use this skill when working with or reviewing EUI components, resolving a11y-related (@elastic/eui) ESLint issues, and ensuring proper use of ARIA attributes, focus management, keyboard interactions, and accessible naming conventions.
Also in 3 projects that use this
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- nahid-sparktales/agent-dispatcher★ 59same name
- bestdeejay-design/agent-skills★ 6same name
- MartinOlivero/saas-builder★ 4same name
- thejordanleopold/claude-code-skills-distilled★ 4same name
- miptah21/skills★ 2same name
- shreyas-makes/agent-skills★ 2same name
- yiweiwan/skills★ 1same name
- basidiocarp/pileus★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository172 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- 00-meta-initializationSkill
- chwezi-dev-engineSkill
- ai-agent-commercial-operationsSkill
- ai-agent-compliance-controlsSkill
- ai-agent-governance-and-limitsSkill
- ai-agent-multi-agent-coordinationSkill
- ai-agent-observability-evaluationSkill
- ai-agent-runtime-architectureSkill
- ai-agent-safety-and-red-teamSkill
- ai-agent-tooling-and-hitlSkill
- ai-analyticsSkill
- ai-app-architectureSkill
- ai-cost-and-meteringSkill
- ai-economic-value-engineSkill
- ai-evaluationSkill
- ai-feature-rollout-and-experimentationSkill
- ai-feature-specSkill
- ai-incident-responseSkill
- ai-llm-integrationSkill
- ai-model-gatewaySkill
- ai-observability-and-debuggingSkill
- ai-opportunity-canvasSkill
- ai-prompt-engineeringSkill
- ai-rag-patternsSkill
- ai-securitySkill
- ai-web-appsSkill
- coding-agent-optimizationSkill
- openai-agents-sdkSkill
- android-developmentSkill
- api-design-firstSkill
- distributed-systems-patternsSkill
- ecommerce-platform-audit-requirementsSkill
- graphql-patternsSkill
- microservices-architectureSkill
- system-architecture-designSkill
- validation-contractSkill
- database-design-engineeringSkill
- database-reliabilitySkill
- mysql-engineeringSkill
- postgresql-engineeringSkill
- cicd-pipelinesSkill
- cloud-architectureSkill
- deployment-release-engineeringSkill
- docker-developmentSkill
- infrastructure-as-codeSkill
- kubernetes-platformSkill
- observability-monitoringSkill
- reliability-engineeringSkill
- execution-plan-scriptsSkill
- accounting-engineSkill
- accounting-finance-controllerSkill
- electronic-fiscal-taxingSkill
- multicurrency-and-fxSkill
- avalonia-desktop-developmentSkill
- frontend-architectureSkill
- image-compressionSkill
- nextjs-app-routerSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 3 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 45
Read this SKILL.md, then load references/budgets-and-regression-gate.md plus whichever of loading-performance.md, rendering-and-inp.md, …
- Very specific: line 47
When the change under review was AI-generated, also apply …
- Distinctive: line 65
Global budget for the whole app: Before: "JS < 200KB". After: per-flow budget with device class, e.g.
- Distinctive: line 66
Anti-patterns as principles, not mechanics: Before: "Avoid tight coupling between UI and API".
- Very specific: line 67
Lighthouse score as the sole KPI: Before: "We target Lighthouse 90+ on PRs".
- Very specific: line 68
Lazy-loading the LCP image: Before: <img src="hero.jpg" loading="lazy">.
- Very specific: line 69
Animating layout-triggering properties: Before: transition: width 300ms on a sidebar.
- Very specific: line 70
Regression gate that only warns: Before: CI job posts a comment with size-limit delta.
- Very specific: line 71
Inventing frontend-only dashboards: Before: a bespoke Grafana board owned by the frontend team.
- Very specific: line 72
Preloading everything: Before: ten <link rel="preload"> tags.
- Distinctive: line 98
Read and search the application and measurement configuration first.
- Very specific: line 129
Every SLI maps to an SLO owned by observability-monitoring.
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Frontend Performance
Acknowledgement: Shared by Peter Bamuhigire, techguypeter.com, +256 784 464178.
Specialist frontend skill. Produces the three deliverables that give a team an operable performance posture: a budget per critical flow, a measurement plan tied to the SLO set, and a regression gate in CI. Not a generic optimisation checklist.
Prerequisites: Load system-architecture-design (for the critical-flow table) and observability-monitoring (for the SLO set and RUM dashboard conventions) before this skill. Load react-development or nextjs-app-router if the stack is React/Next.
<!-- dual-compat-start -->Chwezi Product Excellence Standard (mandatory)
Any Chwezi app or system UI work (effective 01 Nov 2026) MUST follow the Chwezi Product Excellence Standard in chwezi-design-engine (resolve via the engine-routing table; never hard-code the path): doctrine/product-excellence-standard.md and skill skills/00-cross-cutting-ops-qa-a11y/chwezi-product-excellence-standard. Engineering gates: product-excellence-engineering-gates.md. For Chwezi apps, "good" Core Web Vitals at p75 on a low-end mobile profile and the Android device budget (Baseline Profiles, Macrobenchmark on a physical floor device) are release gates. Where this skill and the standard differ, the standard wins.
Use When
- Defining the performance budget for a new product or critical flow.
- Diagnosing a field regression on LCP, INP, or CLS captured by RUM.
- Wiring up a regression gate before a team scales frontend merges.
- Auditing an existing frontend and translating findings into budgets and gates.
- Choosing between inline CSS vs deferred, server vs client rendering, or route vs component code-split.
Do Not Use When
- The bottleneck is server latency or database query time — use
observability-monitoring, the relevant database skill, orreliability-engineering. - The work is API contract design — use
api-design-first. - The work is pure visual/interaction design without a measurable performance cost — use the UI/UX baseline skills.
Required Inputs
- Critical-flow table from
system-architecture-design. - SLO set and RUM dashboard conventions from
observability-monitoring. - Device and network mix for the target user base.
Workflow
- Read this SKILL.md, then load
references/budgets-and-regression-gate.mdplus whichever ofloading-performance.md,rendering-and-inp.md,framework-recipes.mdthe task requires. - Load
references/performance-engineering-procedure.mdwhen diagnosing field regressions by metric sub-part, adding Speculation Rules/bfcache/fetchpriority, governing third-party or AI chat scripts, budgeting streaming AI interfaces, or checking toolchain currentness. - When the change under review was AI-generated, also apply
../../sdlc-meta/ai-assisted-development/references/ai-generated-code-review-gate.md. - Produce the three deliverables (budget, measurement plan, regression gate) before chasing individual optimisations.
- Tie every SLI back to an SLO owned by
observability-monitoring.
Quality Standards
- Budget rows and SLIs map one-to-one with critical flows and SLOs; no orphan metrics.
- Gate is blocking in CI, not advisory.
- Field measurement (RUM) is primary; lab measurement is a leading indicator.
Anti-Patterns
- Chasing Lighthouse score without a field measurement plan.
- Declaring a budget without naming the device class and network.
- Adding a regression gate that only warns and never blocks.
Skill-specific anti-patterns:
- Global budget for the whole app. Before: "JS < 200KB". After: per-flow budget with device class, e.g. "Product listing on Moto G Power, 4G: JS < 200KB, LCP p75 < 2.2s". A flat global budget lets heavy flows hide behind light ones.
- Anti-patterns as principles, not mechanics. Before: "Avoid tight coupling between UI and API". After: "Do not
awaitsequential API calls inside a server component that blocks streaming — usePromise.allor move non-critical data to a<Suspense>boundary". Concrete fix, concrete diagnostic. - Lighthouse score as the sole KPI. Before: "We target Lighthouse 90+ on PRs". After: Lighthouse CI is one lane in the gate; field LCP/INP/CLS p75 drive the alerting contract. Lab-only optimisation masks real-user regressions on low-end devices.
- Lazy-loading the LCP image. Before:
<img src="hero.jpg" loading="lazy">. After:<img src="hero.jpg" loading="eager" fetchpriority="high" width=... height=...>plus<link rel="preload" as="image" ...>when the hero is below the HTML discoverability point. - Animating layout-triggering properties. Before:
transition: width 300mson a sidebar. After:transition: transform 300mswith the sidebar off-canvas and translated in. Avoids forced layout on every frame. - Regression gate that only warns. Before: CI job posts a comment with
size-limitdelta. After: job fails the required check when any entry exceeds budget; baseline regeneration is a deliberate PR. Non-blocking gates decay within two sprints. - Inventing frontend-only dashboards. Before: a bespoke Grafana board owned by the frontend team. After: SLIs published on the RUM dashboard defined by
observability-monitoring, with alert routing through the shared on-call pipeline. - Preloading everything. Before: ten
<link rel="preload">tags. After: preload only the LCP image and one critical font; everything else competes for bandwidth on the critical path.
Outputs
- Performance budget per critical flow.
- Measurement plan (SLIs, source, reporting surface, alert thresholds).
- Regression gate in CI.
Skill-specific outputs:
| Artifact | Consumed by | Template |
| Performance budget per critical flow | deployment-release-engineering, observability-monitoring, QA | references/budgets-and-regression-gate.md |
| Measurement plan (SLIs, sources, reporting, thresholds) | observability-monitoring, on-call | references/budgets-and-regression-gate.md |
| Regression gate in CI | cicd-pipelines, deployment-release-engineering | references/budgets-and-regression-gate.md |
| Framework recipe notes | react-development, nextjs-app-router, Vue/Nuxt specialists | references/framework-recipes.md |
Evidence Produced
| Category | Artifact | Format | Example |
| Performance | Performance budget document | Markdown doc stating page, API, and interaction budgets | docs/performance/budgets-checkout.md |
| Performance | Real-user and synthetic metrics evidence | Dashboard link plus archived snapshot | docs/performance/rum-snapshot-2026-04-16.md |
Capability contract
Read and search the application and measurement configuration first. Editing and execution require authorisation; when available, run the existing build, bundle analysis, lab checks, and relevant tests. Network access is optional for current browser guidance.
references/budgets-and-regression-gate.mdreferences/loading-performance.mdreferences/rendering-and-inp.mdreferences/framework-recipes.mdreferences/performance-engineering-procedure.md
<!-- dual-compat-end -->When this skill applies
- Establishing a performance budget for a new product or each critical flow in an existing product.
- Investigating a field regression in LCP, INP, or CLS flagged by RUM.
- Designing a CI regression gate before the team scales frontend merges.
- Auditing an existing frontend and producing budgets plus gates, not just a "make it faster" ticket list.
- Choosing between competing rendering strategies (SSR vs SSG vs CSR, inline vs deferred CSS, route vs component split).
Inputs
| Artifact | Produced by | Required? | Why |
| Critical-flow table | system-architecture-design | required | Budgets are defined per critical flow, not per page |
| SLO set | observability-monitoring | required | Frontend SLIs must align with owned SLOs and alert pipelines |
| RUM dashboard conventions | observability-monitoring | required | Where field measurements are reported and alerted |
| Device + network mix | product/analytics | required | Determines the reference device class and throttling profile |
| API error model | api-design-first | optional | Informs retry + fallback UI budget |
| Threat model | vibe-security-skill | optional | Gates CSP and third-party script decisions |
Non-negotiables
- A budget is stated per critical flow with an explicit device class and network.
- Every SLI maps to an SLO owned by
observability-monitoring; no stand-alone frontend dashboards. - Regression gate blocks merges when thresholds are breached; it is not advisory.
- Field measurements (
web-vitalsbeaconed to RUM) drive alerting. Lab metrics (Lighthouse CI) are a PR leading indicator only. - Core Web Vitals targets: LCP p75 < 2.5s, INP p75 < 200ms, CLS p75 < 0.1 — unless a flow-specific budget supersedes them with written justification.
Decision rules
Rendering strategy
Mostly static marketing / docs / blog -> SSG (or ISR with long revalidate)
Authenticated dashboard, per-user data -> SSR streaming + client islands
Highly interactive tool (editor, canvas) -> CSR with aggressive code-split
Tenant-scoped SaaS app, mixed criticality -> Server components + selective client
Wrong choice failure mode:
- SSG for per-user data -> stale personalisation, auth leaks across caches
- SSR for heavy interactivity -> slow TTFB, wasted server render on cold data
- CSR for content-first pages -> poor LCP, poor SEOInline CSS vs deferred
Above-fold critical path, < 14KB critical CSS -> inline in <head>
Route-specific, bulky, cachable -> external file, async preload
Third-party widget CSS (chat, analytics UI) -> defer, load after interaction
Design tokens / reset / typography base -> inline (tiny, load-blocking is fine)
Wrong choice failure mode:
- Inline everything -> bloated HTML, no CSS caching across navigations
- Defer critical styles -> FOUC and layout shift on first paintCode splitting strategy
Route-based split -> default for every SPA/Next route
Component-level dynamic import -> heavy widget (editor, chart, map) > 30KB
Vendor split (react/react-dom) -> long-cache chunk, rarely updated
No split -> only for single-page tools under 150KB total
Wrong choice failure mode:
- Over-splitting tiny chunks -> HTTP request overhead + waterfall
- Single monolithic bundle -> blocks initial interactivity, poor INPImage handling
Hero / LCP candidate -> eager, fetchpriority=high, preload
Above fold, non-LCP -> eager, default priority
Below fold -> loading=lazy, decoding=async
Vector/icon under 2KB -> inline SVG (no request)
Repeat background -> CSS background with responsive image-set()
Wrong choice failure mode:
- Lazy-loading LCP -> catastrophic LCP regression
- Eager-loading below fold -> bandwidth waste, contention with LCPWhen to add a new SLI
Metric exists and alert correlates with user-visible harm -> keep, publish on dashboard
Metric is a proxy with no known user impact -> do not alert, log for investigation
Metric is a per-flow variant of a global SLI -> add as dimension, not new SLI
Metric overlaps a backend SLO -> owned by observability-monitoring, not hereCore content
The three deliverables below are the contract. Everything else in references/ supports producing them.
1. Performance budget per critical flow
For each row in the upstream critical-flow table, declare: target device class, target network, LCP, INP, CLS, compressed JS, compressed CSS, total compressed transfer, image-LCP cap. Example table and rules: references/budgets-and-regression-gate.md.
2. Measurement plan
For every SLI: the source (field or lab), the beacon/collector, the dashboard where it is reported, and the alert threshold. Field measurements use web-vitals JS beaconed to the RUM backend defined by observability-monitoring. Lab measurements use Lighthouse CI in the merge pipeline.
3. Regression gate
A blocking CI job with at least: size-limit per entry, Lighthouse CI score and LCP deltas, and a bundle-diff check that flags new dependencies above a threshold. Post-deploy RUM regression triggers a rollback per deployment-release-engineering. Full workflow in references/budgets-and-regression-gate.md.
Working reference material
- Loading-path tactics (images, JS, CSS, fonts, hints, compression):
references/loading-performance.md. - Rendering, CLS, and INP mechanics:
references/rendering-and-inp.md. - Framework recipes (React, Next.js App Router, Vue, vanilla, service workers):
references/framework-recipes.md.
Read next
skill-composition-standards— house-style and contract rules this skill conforms to.observability-monitoring— owner of SLOs, RUM dashboard, and alert pipeline that the measurement plan plugs into.system-architecture-design— source of the critical-flow table that budgets depend on.react-development— React-specific patterns referenced by the framework recipes.nextjs-app-router— Next.js App Router strategies for server components, streaming, andnext/image.
References
references/budgets-and-regression-gate.md— the three deliverables in template form.references/loading-performance.md— image, JS, CSS, font, and resource-hint detail.references/rendering-and-inp.md— layout, paint, CLS, and INP mechanics.references/framework-recipes.md— React, Next.js App Router, Vue, vanilla, service workers.references/performance-engineering-procedure.md— diagnose-fix-gate procedure, navigation acceleration, third-party and streaming-AI budgets, toolchain currentness.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

