Web Performance
Use current browser evidence for the page and state the user named. Metrics,
thresholds, and tooling change; retrieve current web.dev or Chrome documentation
before citing specific thresholds or API details.
Set the acceptance scope
Choose the smallest mode that answers the request:
- Named regression or metric: measure that path and analyze its likely
contributors.
- General performance audit: capture representative load evidence, rank the
material issues, and stop when the highest-impact causes are explained.
- Optimization work: establish a comparable baseline, change only the
authorized code, and remeasure the same page, viewport, network conditions,
and cache state.
The user outcome and performance risk created by the proposed change define the
gates. Accessibility, generic code quality, every bundler setting, and every
available DevTools insight are separate concerns unless the request or evidence
makes one relevant. A discovered non-blocking improvement is a follow-up, not a
release prerequisite.
Choose available evidence
Prefer a browser tool that can record a performance trace and inspect network
requests. If the preferred Chrome DevTools integration is unavailable, use
another available browser measurement path or report the limitation. Do not
make installing a particular MCP server an acceptance gate unless the user asks
for that tool specifically.
Useful evidence, selected as needed:
- a cold or warm page-load trace;
- Core Web Vitals and the element or interaction that owns the metric;
- the critical network dependency chain and response headers;
- request payload sizes and estimated savings;
- relevant DOM or source ownership for the measured culprit;
- field data when the user asks about real-user performance and it is available.
Keep lab and field evidence distinct. Record the URL, viewport, cache state,
network/CPU conditions, and run count when they materially affect comparison.
Navigation investigations
- Measure the journey the visitor takes. For a cold document, time the tap
to first byte and then to native first contentful paint (FCP). For an in-site
link or search result, time selection to visible, usable destination content.
Define that content before testing, such as the first playable talk or a row
with a real count and working download. Record whether the click loaded a new
document or reused the current one.
- Explain a slow visit with its own timestamps. To explain p75, inspect a
visit at or near that rank. Trace which requests ran in sequence, which
overlapped, and when the content became usable. Adding separately computed
stage percentiles can combine timings from different visits.
- Verify which experience was served. For rollout comparisons, record the
build and check a response or rendered marker for the actual treatment.
Report forced treatment, forced control, and ordinary unforced visits
separately, with sample counts and the observed arm split for unforced visits.
Focused workflow
- Reproduce the named page, route, viewport, and state.
- Capture a trace or the narrowest available measurement. Repeat only enough
to distinguish a stable signal from obvious noise.
- Inspect the insight, requests, DOM, or code that can confirm the leading
cause. Do not infer an unused or blocking resource from naming alone.
- Rank only issues with material measured or well-supported impact. A 0 ms
estimate or already-good metric is not an optimization task.
- If implementation is requested, make the smallest relevant change and
remeasure under comparable conditions.
- Stop when the requested metric or regression is explained, or the authorized
change is comparably verified. State uncertainty and follow-ups separately.
Risk-triggered checks
Select these only when the evidence points to them:
- LCP or FCP: server latency, resource discovery, render delay, hero/font
priority, and render-blocking resources.
- CLS: the actual shifting elements, missing dimensions, injected content,
and font behavior.
- INP or main-thread delay: the measured interaction, long tasks, event
handlers, hydration, and script evaluation.
- Network weight or dependency depth: compression, caching, payload size,
request chains, preloads, and preconnect usage.
- Bundle ownership: framework and bundler configuration only far enough to
locate the measured cost; do not run a generic tree-shaking audit by default.
Verify before recommending removal. Confirm request use, execution, or coverage
with current evidence, and avoid prescribing framework-specific configuration
from memory.
Report
Lead with the answer to the performance question. Include:
- measured values and conditions;
- the highest-impact confirmed causes;
- specific fixes or completed changes with expected or measured impact;
- evidence unavailable or too noisy to support a claim; and
- non-blocking opportunities as follow-ups.
Use a metric table only when multiple measurements benefit from comparison. Do
not claim a full audit when only one trace, page, viewport, or lab environment
was tested.
1---2name: web-perf3description: Measure, diagnose, or review web page performance when page speed, Core Web Vitals, Lighthouse performance, loading behavior, or a named performance regression is the primary task. Use current browser evidence and first-party documentation. Do not turn a focused metric investigation into a full performance, accessibility, bundler, and codebase audit.4metadata:5 source: https://skillmd.com/skills/swyxio/web-perf6---78# Web Performance910Use current browser evidence for the page and state the user named. Metrics,11thresholds, and tooling change; retrieve current web.dev or Chrome documentation12before citing specific thresholds or API details.1314## Set the acceptance scope1516Choose the smallest mode that answers the request:1718- **Named regression or metric:** measure that path and analyze its likely19 contributors.20- **General performance audit:** capture representative load evidence, rank the21 material issues, and stop when the highest-impact causes are explained.22- **Optimization work:** establish a comparable baseline, change only the23 authorized code, and remeasure the same page, viewport, network conditions,24 and cache state.2526The user outcome and performance risk created by the proposed change define the27gates. Accessibility, generic code quality, every bundler setting, and every28available DevTools insight are separate concerns unless the request or evidence29makes one relevant. A discovered non-blocking improvement is a follow-up, not a30release prerequisite.3132## Choose available evidence3334Prefer a browser tool that can record a performance trace and inspect network35requests. If the preferred Chrome DevTools integration is unavailable, use36another available browser measurement path or report the limitation. Do not37make installing a particular MCP server an acceptance gate unless the user asks38for that tool specifically.3940Useful evidence, selected as needed:4142- a cold or warm page-load trace;43- Core Web Vitals and the element or interaction that owns the metric;44- the critical network dependency chain and response headers;45- request payload sizes and estimated savings;46- relevant DOM or source ownership for the measured culprit;47- field data when the user asks about real-user performance and it is available.4849Keep lab and field evidence distinct. Record the URL, viewport, cache state,50network/CPU conditions, and run count when they materially affect comparison.5152## Navigation investigations5354- **Measure the journey the visitor takes.** For a cold document, time the tap55 to first byte and then to native first contentful paint (FCP). For an in-site56 link or search result, time selection to visible, usable destination content.57 Define that content before testing, such as the first playable talk or a row58 with a real count and working download. Record whether the click loaded a new59 document or reused the current one.60- **Explain a slow visit with its own timestamps.** To explain p75, inspect a61 visit at or near that rank. Trace which requests ran in sequence, which62 overlapped, and when the content became usable. Adding separately computed63 stage percentiles can combine timings from different visits.64- **Verify which experience was served.** For rollout comparisons, record the65 build and check a response or rendered marker for the actual treatment.66 Report forced treatment, forced control, and ordinary unforced visits67 separately, with sample counts and the observed arm split for unforced visits.6869## Focused workflow70711. Reproduce the named page, route, viewport, and state.722. Capture a trace or the narrowest available measurement. Repeat only enough73 to distinguish a stable signal from obvious noise.743. Inspect the insight, requests, DOM, or code that can confirm the leading75 cause. Do not infer an unused or blocking resource from naming alone.764. Rank only issues with material measured or well-supported impact. A 0 ms77 estimate or already-good metric is not an optimization task.785. If implementation is requested, make the smallest relevant change and79 remeasure under comparable conditions.806. Stop when the requested metric or regression is explained, or the authorized81 change is comparably verified. State uncertainty and follow-ups separately.8283## Risk-triggered checks8485Select these only when the evidence points to them:8687- **LCP or FCP:** server latency, resource discovery, render delay, hero/font88 priority, and render-blocking resources.89- **CLS:** the actual shifting elements, missing dimensions, injected content,90 and font behavior.91- **INP or main-thread delay:** the measured interaction, long tasks, event92 handlers, hydration, and script evaluation.93- **Network weight or dependency depth:** compression, caching, payload size,94 request chains, preloads, and preconnect usage.95- **Bundle ownership:** framework and bundler configuration only far enough to96 locate the measured cost; do not run a generic tree-shaking audit by default.9798Verify before recommending removal. Confirm request use, execution, or coverage99with current evidence, and avoid prescribing framework-specific configuration100from memory.101102## Report103104Lead with the answer to the performance question. Include:105106- measured values and conditions;107- the highest-impact confirmed causes;108- specific fixes or completed changes with expected or measured impact;109- evidence unavailable or too noisy to support a claim; and110- non-blocking opportunities as follow-ups.111112Use a metric table only when multiple measurements benefit from comparison. Do113not claim a full audit when only one trace, page, viewport, or lab environment114was tested.