You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Remove LCP-Image-Entropy.js: low-entropy filter has been in Chrome stable since Chrome 112, making the script no longer actionable
- Update LCP-Video-Candidate.js: Chrome now considers the first frame of <video> elements as an LCP candidate. Add lcpSource ("poster" | "first-frame" | "unknown") to details, replace the missing-poster error with contextual info/warning based on lcpSource
- Remove cross-skill references to skills not yet available (webperf-loading, webperf-interaction, webperf-media). Decision trees now reference only scripts in this skill with general guidance where follow-up is needed
-**If CLS > 0.1** → Check `sources` in the result for the shifting elements; inspect for missing `width`/`height` attributes, late-loading fonts, or dynamic content insertion
126
+
-**If CLS > 0.25 (poor)** → Call `getCLS()` after interactions to confirm the score accumulates over time
171
127
-**If CLS = 0** → Confirm with multiple page loads (might be timing-dependent)
172
128
173
129
### After INP.js
174
130
175
-
-**If INP > 200ms** → Run **webperf-interaction:Interactions.js** to identify slow interactions
176
-
-**If INP > 500ms (poor)** → Run full INP debugging workflow:
177
-
1.**webperf-interaction:Interactions.js** (list all interactions)
-**If render delay or interaction delay is high** → Use **webperf-interaction** skill:
217
-
- Long-Animation-Frames.js (main thread blocking)
218
-
219
-
> **Note on cross-skill references:** This skill runs in an isolated subagent (`context: fork`). When a decision tree recommends scripts from another skill (e.g., `webperf-loading`, `webperf-interaction`, `webperf-media`), report the recommendation to the user as a next step — do not attempt to execute those scripts directly. The user or the main agent can activate the appropriate skill to continue the investigation.
131
+
-**If INP > 200ms** → Call `getINPDetails()` to list all interactions ranked by duration and identify the slowest one
132
+
-**If INP > 500ms (poor)** → Check `phases` in the worst interaction: high `inputDelay` suggests main thread blocking; high `processingDuration` suggests heavy event handler work
133
+
-**If specific interaction type is slow (e.g., keyboard)** → Focus `getINPDetails()` on that interaction type
220
134
221
135
## Error Recovery
222
136
223
137
When a script returns `status: "error"`:
224
138
225
139
-**LCP/CLS/LCP-Sub-Parts/LCP-Trail** → The page may not have finished loading. Ask the user to wait for full load or reload, then re-run the script.
226
140
-**INP** (`getINP()` returns error) → No interactions have been recorded yet. Remind the user to interact with the page, then call `getINP()` again.
227
-
-**LCP-Image-Entropy** → No images with measurable BPP found. This is normal for text-only pages or pages where all images are data URIs.
228
141
-**LCP-Video-Candidate** → No LCP entries found; see LCP error recovery above.
Copy file name to clipboardExpand all lines: skills/webperf-core-web-vitals/references/snippets.md
+3-15Lines changed: 3 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,27 +68,15 @@ Tracks every LCP candidate element during page load and highlights each one with
68
68
69
69
**Returns:** Array of all LCP candidates in order, with selector, time, element type, and URL (if applicable). The last entry is the final LCP element.
70
70
---
71
-
## LCP Image Entropy
72
-
73
-
Checks if images qualify as LCP candidates based on their entropy (bits per pixel). Since Chrome 112, low-entropy images are ignored for LCP measurement.
Detects whether the LCP element is a `<video>` and audits the poster image configuration — the most common source of avoidable LCP delay when video is the hero element.
73
+
Detects whether the LCP element is a `<video>` and audits the configuration. Chrome considers both the poster image and the first frame of the video as LCP candidates.
87
74
88
75
**Script:**`scripts/LCP-Video-Candidate.js`
89
76
90
77
**Checks:**
91
-
- Whether a `poster` attribute exists
78
+
- Whether the LCP source is the poster image or the first video frame (`lcpSource`)
79
+
- Whether a `poster` attribute exists (recommended for explicit control)
92
80
- Whether the poster is preloaded with `<link rel="preload" as="image">`
93
81
- Whether `fetchpriority="high"` is set on the preload
94
82
- Whether the poster uses a modern format (AVIF, WebP)
0 commit comments