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
Copy file name to clipboardExpand all lines: skills/webperf-core-web-vitals/SKILL.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,12 +28,12 @@ Scripts fall into two execution patterns:
28
28
29
29
Run via `evaluate_script` and return structured JSON immediately from buffered performance data. The page must have already loaded.
30
30
31
-
### Tracking (INP)
31
+
### Measuring (INP)
32
32
33
33
INP requires real user interactions to measure. The workflow is:
34
34
35
-
1. Run `INP.js` via `evaluate_script` → returns `{ status: "tracking", getDataFn: "getINP" }`
36
-
2.**Tell the user:** "INP tracking is now active. Please interact with the page — click buttons, open menus, fill form fields — then let me know when you're done."
35
+
1. Run `INP.js` via `evaluate_script` → returns `{ status: "measuring", getDataFn: "getINP" }`
36
+
2.**Tell the user:** "INP measuring is now active. Please interact with the page — click buttons, open menus, fill form fields — then let me know when you're done."
37
37
3. Wait for the user to confirm they've interacted.
38
38
4. Call `evaluate_script("getINP()")` to collect results.
39
39
5. If `getINP()` returns `status: "error"` → the user has not interacted yet. Remind them and wait.
@@ -50,15 +50,15 @@ When the user asks for a comprehensive Core Web Vitals analysis or "audit CWV":
50
50
1.**LCP.js** - Measure Largest Contentful Paint
51
51
2.**CLS.js** - Measure Cumulative Layout Shift
52
52
3.**INP.js** - Measure Interaction to Next Paint
53
-
4.**LCP-Sub-Parts.js** - Break down LCP timing phases
53
+
4.**LCP-Subparts.js** - Break down LCP timing phases
Copy file name to clipboardExpand all lines: skills/webperf-core-web-vitals/references/schema.md
+12-22Lines changed: 12 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
# Script Return Value Schema
2
2
3
-
All scripts return a structured JSON object as the IIFE return value. This allows agents using `evaluate_script` to read structured data directly from the return value, rather than parsing human-readable console output.
3
+
All scripts return a structured JSON object as the return value. This allows agents using `evaluate_script` to read structured data directly from the return value, rather than parsing human-readable console output.
4
4
5
5
## Base Shape
6
6
7
7
```typescript
8
8
{
9
9
script: string; // Script name, e.g. "LCP", "CLS", "INP"
10
10
status: "ok"// Script ran, has data
11
-
|"tracking"// Observer active, data accumulates over time
11
+
|"monitoring"// Observer active, data accumulates over time
12
12
|"error"// Failed or no data available
13
13
|"unsupported"; // Browser API not supported
14
14
@@ -25,7 +25,7 @@ All scripts return a structured JSON object as the IIFE return value. This allow
Copy file name to clipboardExpand all lines: skills/webperf-core-web-vitals/references/snippets.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Quick check for Largest Contentful Paint, a Core Web Vital that measures loading
15
15
---
16
16
## Cumulative Layout Shift (CLS)
17
17
18
-
Quick check for Cumulative Layout Shift, a Core Web Vital that measures visual stability. CLS tracks how much the page layout shifts unexpectedly during its lifetime, providing a single score that represents the cumulative impact of all unexpected layout shifts.
18
+
Quick check for Cumulative Layout Shift, a Core Web Vital that measures visual stability. CLS tracks how much the page layout shifts unexpectedly during its lifetime, providing a single score that represents the worst batch impact of all unexpected layout shifts.
19
19
20
20
**Script:**`scripts/CLS.js`
21
21
@@ -31,33 +31,33 @@ Quick check for Cumulative Layout Shift, a Core Web Vital that measures visual s
31
31
---
32
32
## Interaction to Next Paint (INP)
33
33
34
-
Tracks Interaction to Next Paint, a Core Web Vital that measures responsiveness. INP evaluates how quickly a page responds to user interactions throughout the entire page visit, replacing First Input Delay (FID) as a Core Web Vital in March 2024.
34
+
Tracks Interaction to Next Paint, a Core Web Vital that measures responsiveness. INP evaluates how quickly a page responds to user interactions throughout the entire page visit.
35
35
36
36
**Script:**`scripts/INP.js`
37
37
38
-
**Usage:** Run `INP.js` once to start tracking. It returns `status: "tracking"` immediately. After the user interacts with the page, call `getINP()` to retrieve the current INP value.
38
+
**Usage:** Run `INP.js` once to start measuring. It returns `status: "measuring"` immediately. After the user interacts with the page, call `getINP()` to retrieve the current INP value.
39
39
40
40
**Thresholds:**
41
41
42
42
| Rating | Time | Meaning |
43
43
|--------|------|---------|
44
-
| 🟢 Good | ≤ 200ms | Responsive, feels instant|
44
+
| 🟢 Good | ≤ 200ms | Responsive, feels responsive|
Breaks down Largest Contentful Paint into its four phases to identify optimization opportunities. Understanding which phase is slowest helps focus optimization efforts where they'll have the most impact.
51
51
52
-
**Script:**`scripts/LCP-Sub-Parts.js`
52
+
**Script:**`scripts/LCP-Subparts.js`
53
53
54
-
**Sub-parts:**
54
+
**Subparts:**
55
55
56
56
| Phase | Target | Description |
57
57
|-------|--------|-------------|
58
58
| Time to First Byte (TTFB) | ≤ 800ms | Navigation start → first HTML byte |
0 commit comments