@vesviet/agent-skills 5.6.0 → 5.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/INDEX.md +1 -1
- package/README.md +1 -1
- package/VERSION +1 -1
- package/adapters/antigravity/a2a-config.template.yaml +1 -1
- package/adapters/antigravity/role-skill-index.json +1 -1
- package/adapters/claude/CLAUDE_ADAPTER.md +1 -1
- package/adapters/cursor/README.md +185 -185
- package/bin/agent-skills.mjs +17 -14
- package/core/contracts/schemas/api-contract-spec.json +191 -191
- package/core/contracts/schemas/feature-ticket.json +1293 -1293
- package/core/contracts/schemas/pull-request-spec.json +338 -338
- package/core/contracts/schemas/references/detailed/01-solution-and-governance.md +19 -19
- package/core/contracts/schemas/references/detailed/02-engineering-delivery.md +93 -93
- package/core/contracts/schemas/references/detailed/04-finance-accounting-and-compliance.md +54 -54
- package/core/contracts/schemas/references/detailed/05-design-and-content.md +92 -92
- package/core/contracts/schemas/references/detailed/06-seo-and-publishing.md +48 -48
- package/core/contracts/schemas/references/detailed/07-a2a-protocol.md +85 -85
- package/core/contracts/schemas/test-report.json +530 -530
- package/core/roles/references/business-analyst-responsibilities.md +207 -207
- package/core/roles/references/frontend-developer-responsibilities.md +275 -275
- package/core/roles/system-engineer.md +465 -465
- package/core/skills/agent/agent-memory-compaction/references/anchored-schema-and-compaction-algorithms.md +141 -141
- package/core/skills/backend/build-mcp-server/SKILL.md +100 -100
- package/core/skills/backend/implement-structured-outputs/SKILL.md +94 -94
- package/core/skills/business/elicit-requirements/SKILL.md +102 -102
- package/core/skills/business/elicit-requirements/references/elicitation-techniques-and-babok-criteria.md +60 -60
- package/core/skills/business/trace-requirements-impact/SKILL.md +97 -97
- package/core/skills/business/trace-requirements-impact/references/rtm-graph-and-prioritization-models.md +109 -109
- package/core/skills/business/write-use-cases/SKILL.md +106 -106
- package/core/skills/business/write-use-cases/references/cockburn-scoping-and-13-field-template.md +135 -135
- package/core/skills/document/pptx/scripts/add_slide.py +0 -0
- package/core/skills/document/pptx/scripts/clean.py +0 -0
- package/core/skills/document/pptx/scripts/thumbnail.py +0 -0
- package/core/skills/document/xlsx/scripts/recalc.py +0 -0
- package/core/skills/documentation/write-documentation/SKILL.md +143 -143
- package/core/skills/documentation/write-tech-radar/SKILL.md +149 -149
- package/core/skills/foundation/accessibility-review/SKILL.md +160 -160
- package/core/skills/foundation/release-notes/SKILL.md +192 -192
- package/core/skills/foundation/webapp-server-runner/scripts/with_server.py +0 -0
- package/core/skills/foundation/write-product-brief/SKILL.md +160 -160
- package/core/skills/platform/cloudflare-email-service/SKILL.md +166 -166
- package/core/skills/platform/cloudflare-email-service/references/routing.md +199 -199
- package/core/skills/platform/debug-workers-edge/SKILL.md +111 -111
- package/core/skills/platform/sandbox-sdk/SKILL.md +183 -183
- package/core/skills/platform/setup-gpu-finops/SKILL.md +107 -107
- package/core/skills/platform/setup-llm-gateway/SKILL.md +108 -108
- package/core/skills/platform/turnstile-spin/SKILL.md +118 -118
- package/core/skills/platform/turnstile-spin/scripts/auth-probe.sh +0 -0
- package/core/skills/platform/turnstile-spin/scripts/fetch-secret.sh +0 -0
- package/core/skills/platform/turnstile-spin/scripts/persist-skill.sh +0 -0
- package/core/skills/platform/turnstile-spin/scripts/validate.sh +0 -0
- package/core/skills/platform/turnstile-spin/scripts/widget-create.sh +0 -0
- package/core/skills/platform/turnstile-spin/scripts/worker-deploy.sh +0 -0
- package/core/skills/platform/turnstile-spin/templates/worker/src/index.ts +199 -199
- package/core/skills/platform/turnstile-spin/templates/worker/wrangler.toml +31 -31
- package/core/skills/platform/web-perf/SKILL.md +151 -151
- package/core/skills/platform/workers-best-practices/references/rules.md +463 -463
- package/core/skills/product/build-story-map/SKILL.md +104 -104
- package/core/skills/product/build-story-map/references/story-mapping-and-cpm-scheduling.md +101 -101
- package/core/skills/product/define-product-strategy/SKILL.md +105 -105
- package/core/skills/product/define-product-strategy/references/strategy-frameworks-and-pr-faq.md +142 -142
- package/core/skills/product/model-saas-metrics/SKILL.md +104 -104
- package/core/skills/product/model-saas-metrics/references/saas-unit-economics-and-pricing.md +110 -110
- package/core/skills/product/prioritize-roadmap/SKILL.md +106 -106
- package/core/skills/product/prioritize-roadmap/references/prioritization-scoring-and-kill-criteria.md +105 -105
- package/core/skills/repo-ops/commit-code/SKILL.md +190 -190
- package/core/skills/repo-ops/commit-code/references/multi-repo-and-deployment.md +21 -21
- package/core/skills/repo-ops/navigate-service/SKILL.md +199 -199
- package/core/skills/repo-ops/review-code/references/process-and-format.md +100 -100
- package/core/skills/repo-ops/review-service/SKILL.md +186 -186
- package/core/skills/repo-ops/troubleshoot-service/SKILL.md +127 -127
- package/core/skills/repo-ops/troubleshoot-service/references/failure-modes-and-security.md +22 -22
- package/core/skills/repo-ops/troubleshoot-service/references/suggested-process.md +110 -110
- package/core/skills/security-data/security-audit/SKILL.md +119 -119
- package/core/workflows/add-new-feature.md +212 -212
- package/core/workflows/agent-a2a-delegation.md +142 -142
- package/core/workflows/bug-fix.md +147 -147
- package/core/workflows/build-deploy.md +208 -208
- package/core/workflows/code-review.md +137 -137
- package/core/workflows/dependency-upgrade.md +193 -193
- package/core/workflows/feature-delivery.md +149 -149
- package/core/workflows/hotfix-production.md +172 -172
- package/core/workflows/qa-validation.md +231 -231
- package/core/workflows/refactoring.md +154 -154
- package/core/workflows/revert-deployment.md +147 -147
- package/core/workflows/security-incident-response.md +191 -191
- package/core/workflows/seo-content-lifecycle.md +91 -91
- package/core/workflows/service-review-release.md +223 -223
- package/core/workflows/setup-new-service.md +214 -214
- package/core/workflows/tech-repo-review.md +245 -245
- package/core/workflows/troubleshooting.md +241 -241
- package/overlays/astro-cloudflare/README.md +93 -93
- package/overlays/data-analyst-stack/README.md +109 -109
- package/overlays/data-analyst-stack/rules/metric-dashboard-templates.md +135 -135
- package/overlays/data-analyst-stack/rules/stack-conventions.md +80 -80
- package/overlays/ecommerce-microservices/README.md +65 -65
- package/overlays/go-microservices/README.md +78 -78
- package/overlays/go-microservices/rules/go-conventions.md +223 -223
- package/overlays/laravel-filament/README.md +90 -90
- package/overlays/laravel-filament/rules/laravel-conventions.md +220 -220
- package/overlays/laravel-filament/skills/develop-laravel-feature/SKILL.md +141 -141
- package/overlays/laravel-filament/workflows/deploy-laravel.md +133 -133
- package/overlays/obj-configurator/rules/obj-project-rules.md +111 -111
- package/overlays/obj-configurator/skills/develop-obj-feature/SKILL.md +71 -71
- package/overlays/r3f-stack/README.md +89 -89
- package/overlays/r3f-stack/rules/stub.md +43 -43
- package/overlays/r3f-stack/skills/debug-3d-scene/SKILL.md +166 -166
- package/overlays/r3f-stack/skills/integrate-r3f-three-legacy/SKILL.md +159 -159
- package/overlays/r3f-stack/skills/optimize-3d-assets/SKILL.md +128 -128
- package/overlays/seo-publishing/rules/site-mix-and-cannibalization.md +52 -52
- package/overlays/ui-design-system/rules/handoff-conventions.md +73 -73
- package/package.json +2 -2
- package/core/README.md +0 -53
|
@@ -1,151 +1,151 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: web-perf
|
|
3
|
-
description: Analyzes web page performance using Chrome DevTools MCP — measuring Core Web Vitals (LCP, INP, CLS), identifying render-blocking resources, network dependency chains, and caching issues to produce specific, actionable optimization recommendations. Use when auditing Lighthouse scores, debugging slow page loads, profiling Core Web Vitals regressions, or validating performance improvements before release.
|
|
4
|
-
allowed-tools: [read_file, write_file, edit_file, create_file, search_code, run_tests, run_linter, run_build, wrangler_deploy, execute_command]
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Web Perf
|
|
8
|
-
|
|
9
|
-
Analyzes web performance using Chrome DevTools MCP. Measures Core Web Vitals (LCP, INP, CLS) and supplementary metrics (FCP, TBT, Speed Index), identifies render-blocking resources, network dependency chains, layout shifts, caching issues, and accessibility gaps.
|
|
10
|
-
|
|
11
|
-
Your knowledge of web performance metrics, thresholds, and tooling APIs may be outdated. **Prefer retrieval over pre-training** when citing specific numbers or recommendations.
|
|
12
|
-
|
|
13
|
-
## When to Use
|
|
14
|
-
|
|
15
|
-
- auditing Lighthouse / Core Web Vitals
|
|
16
|
-
- debugging slow page loads
|
|
17
|
-
- profiling LCP/INP/CLS regressions
|
|
18
|
-
- validating perf improvements before release
|
|
19
|
-
|
|
20
|
-
## Core Rules
|
|
21
|
-
- Verify MCP tools are available (`navigate_page` or `performance_start_trace`) before starting.
|
|
22
|
-
- Verify claims by checking network requests, DOM, or codebase — then state findings definitively.
|
|
23
|
-
- Confirm something is unused in the trace before suggesting its removal.
|
|
24
|
-
- Skip render-blocking resources with 0ms estimated impact from recommendations.
|
|
25
|
-
- Cite specific resource names and sizes (e.g. "compress hero.png (450KB) to WebP") instead of generic advice.
|
|
26
|
-
- **Always distinguish between lab data (Lighthouse, DevTools) and field data (CrUX, RUM)** — Lighthouse scores do not always reflect real-user experience; always note which you are reporting.
|
|
27
|
-
- **INP-PRIMARY-METRIC**: INP (Interaction to Next Paint) replaced FID as the Core Web Vitals responsiveness metric in March 2024 — do not reference FID; thresholds: good < 200ms | needs improvement 200-500ms | poor > 500ms.
|
|
28
|
-
- **LOAF-API**: Use the Long Animation Frames (LoAF) API (`PerformanceObserver({ type: "long-animation-frame" })`) to attribute long frames to specific scripts — replaces the deprecated Long Tasks API for INP root cause analysis.
|
|
29
|
-
- **LCP-4-PART-ATTRIBUTION**: Attribute LCP using 4 components: TTFB + Resource Load Delay + Resource Load Duration + Element Render Delay — always identify which component dominates before recommending a fix.
|
|
30
|
-
- **SPECULATION-RULES**: Use the Speculation Rules API (`<script type="speculationrules">`) for prefetch/prerender of likely next pages; reduces navigation LCP by 30-80% for multi-page apps; check browser support before enabling.
|
|
31
|
-
- **AI-PERF-ANALYSIS-ADVISORY**: When AI tools summarize trace data, verify all recommendations against the actual network waterfall and trace — AI summaries frequently misattribute root cause when multiple bottlenecks are present.
|
|
32
|
-
|
|
33
|
-
## Retrieval Sources
|
|
34
|
-
|
|
35
|
-
| Source | How to retrieve | Use for |
|
|
36
|
-
|--------|----------------|---------|
|
|
37
|
-
| web.dev | `https://web.dev/articles/vitals` | Core Web Vitals thresholds, definitions, INP guide |
|
|
38
|
-
| Chrome DevTools docs | `https://developer.chrome.com/docs/devtools/performance` | Tooling APIs, trace analysis |
|
|
39
|
-
| Lighthouse scoring | `https://developer.chrome.com/docs/lighthouse/performance/performance-scoring` | Score weights, metric thresholds |
|
|
40
|
-
| CrUX dashboard | `https://developer.chrome.com/docs/crux` | Field data by origin and URL |
|
|
41
|
-
|
|
42
|
-
## Suggested Process
|
|
43
|
-
|
|
44
|
-
### 1. Set Up Measurement Baseline
|
|
45
|
-
- Navigate to the target URL using Chrome DevTools MCP.
|
|
46
|
-
- Record both a cold-load trace (empty cache) and a warm-load trace (cached assets).
|
|
47
|
-
- Capture field data from CrUX if available — note the gap between lab and field.
|
|
48
|
-
|
|
49
|
-
### 2. Analyze Core Web Vitals
|
|
50
|
-
- Call `performance_analyze_insight` to classify each CWV against good/needs-improvement/poor thresholds.
|
|
51
|
-
- For **LCP**: identify the LCP element, its discovery time, load delay, and render delay. Check if it is an `<img>` with missing `fetchpriority="high"` or a background-image (not optimizable by the browser).
|
|
52
|
-
- For **INP**: attribute the worst interaction event to its long-task source. Check for layout thrash, synchronous JS on input, and un-yielded event handlers.
|
|
53
|
-
- For **CLS**: identify the shifted element and its layout instability source (missing width/height, late-injected content, ad slots, web fonts).
|
|
54
|
-
|
|
55
|
-
### 3. Inspect Network and Resource Chain
|
|
56
|
-
- List render-blocking scripts and stylesheets with estimated ms impact.
|
|
57
|
-
- Identify uncompressed or oversized images; check format (WebP, AVIF preferred).
|
|
58
|
-
- Check caching headers (Cache-Control, ETag) for static assets.
|
|
59
|
-
- Find unused CSS/JS — confirm via Coverage tab before recommending removal.
|
|
60
|
-
|
|
61
|
-
### 4. Produce Actionable Recommendations
|
|
62
|
-
- Order fixes by impact: fixes with >100ms estimated gain first.
|
|
63
|
-
- Cite specific resource names, sizes, and file paths — no generic recommendations.
|
|
64
|
-
- State whether each fix requires code change, build config change, or CDN config change.
|
|
65
|
-
|
|
66
|
-
### 5. Validate Improvements
|
|
67
|
-
- Re-record trace after implementing fixes.
|
|
68
|
-
- Compare before/after for each metric — report delta, not just the new number.
|
|
69
|
-
|
|
70
|
-
## Output Format
|
|
71
|
-
|
|
72
|
-
```markdown
|
|
73
|
-
## Web Performance Audit — <URL>
|
|
74
|
-
|
|
75
|
-
Measurement type: [lab / field / both]
|
|
76
|
-
Tool: Chrome DevTools MCP | Lighthouse | CrUX
|
|
77
|
-
|
|
78
|
-
### Core Web Vitals
|
|
79
|
-
| Metric | Value | Status | Data Source |
|
|
80
|
-
|--------|-------|--------|-------------|
|
|
81
|
-
| LCP | Xs | good/NI/poor | lab/field |
|
|
82
|
-
| INP | Xms | good/NI/poor | lab/field |
|
|
83
|
-
| CLS | X | good/NI/poor | lab/field |
|
|
84
|
-
|
|
85
|
-
### Root Causes (ordered by impact)
|
|
86
|
-
1. <specific resource or code path> — <estimated impact>ms
|
|
87
|
-
2. ...
|
|
88
|
-
|
|
89
|
-
### Recommendations
|
|
90
|
-
- [ ] Fix: <specific action> — <file/resource> — impact: ~Xms
|
|
91
|
-
- [ ] ...
|
|
92
|
-
|
|
93
|
-
### Skipped
|
|
94
|
-
- <resource> — 0ms estimated impact
|
|
95
|
-
|
|
96
|
-
### Residual Risk
|
|
97
|
-
- <any metric still in poor range after fixes>
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## Anti-Patterns To Reject
|
|
101
|
-
|
|
102
|
-
- reporting Lighthouse score as the only measure without noting it is lab data
|
|
103
|
-
- recommending removal of a resource before confirming it is unused in the trace
|
|
104
|
-
- citing FID instead of INP for responsiveness measurement (deprecated March 2024)
|
|
105
|
-
- providing generic advice ("reduce JavaScript bundle size") without naming the specific file and size
|
|
106
|
-
- attributing INP issues to the wrong cause (e.g., blaming render-blocking when the actual cause is a synchronous event handler)
|
|
107
|
-
|
|
108
|
-
## Checklist
|
|
109
|
-
|
|
110
|
-
- [ ] Chrome DevTools trace recorded (cold-load and warm-load if needed)
|
|
111
|
-
- [ ] Core Web Vitals classified with correct thresholds (INP, not FID)
|
|
112
|
-
- [ ] LCP, INP, and CLS root causes attributed to specific code or resources
|
|
113
|
-
- [ ] Render-blocking scripts and stylesheets identified with ms impact
|
|
114
|
-
- [ ] Image assets checked for format (WebP/AVIF) and size
|
|
115
|
-
- [ ] Recommendations ordered by estimated impact
|
|
116
|
-
- [ ] Lab vs. field data distinction stated in the report
|
|
117
|
-
- [ ] Before/after comparison run after implementing fixes
|
|
118
|
-
|
|
119
|
-
## Output Contracts
|
|
120
|
-
|
|
121
|
-
When this skill is invoked as part of a coordinated multi-role delivery, emit:
|
|
122
|
-
|
|
123
|
-
- **contracts/schemas/deployment-plan.json** — Required fields: infrastructure_changes[], config_updates[], and
|
|
124
|
-
alidation_run. Set produced_by_role to the emitting developer role.
|
|
125
|
-
|
|
126
|
-
Skip emission for solo refactor work where no downstream handoff is expected.
|
|
127
|
-
|
|
128
|
-
## Failure Modes
|
|
129
|
-
|
|
130
|
-
- **Lighthouse score as only measure**: a "good" Lighthouse score is reported without noting it is lab data. Mitigation: always distinguish lab vs field; report CrUX or RUM alongside.
|
|
131
|
-
- **FID cited**: FID is referenced for responsiveness. Mitigation: FID was deprecated in March 2024; use INP (good < 200ms, NI 200-500ms, poor > 500ms).
|
|
132
|
-
- **AI summary misattributed root cause**: an AI tool summarizes trace data and the recommendation targets the wrong bottleneck. Mitigation: verify every AI recommendation against the actual network waterfall and trace.
|
|
133
|
-
- **Generic recommendation**: advice like "reduce JavaScript bundle size" is given without naming the specific file and size. Mitigation: cite specific resource names, sizes, and file paths in every recommendation.
|
|
134
|
-
- **Resource removal on unconfirmed usage**: a resource is recommended for removal before confirming it is unused in the trace. Mitigation: confirm via Coverage tab; never remove unconfirmed resources.
|
|
135
|
-
- **Speculation Rules without browser check**: `<script type="speculationrules">` is enabled without verifying browser support. Mitigation: check browser support before enabling; surface the support matrix in the report.
|
|
136
|
-
- **LCP cause misattributed**: a "background-image" LCP element is reported as optimizable. Mitigation: background-images are not optimizable by the browser; use the 4-part attribution (TTFB + load delay + load duration + render delay) to identify the dominant component.
|
|
137
|
-
|
|
138
|
-
## Security Guardrails (OWASP ASI)
|
|
139
|
-
|
|
140
|
-
- **ASI04 Supply Chain**: Chrome DevTools MCP, Lighthouse, and any trace analysis library must be schema-validated against the expected manifest; treat unknown versions as untrusted.
|
|
141
|
-
- **ASI05 RCE Guard**: never construct test scripts, page navigations, or trace parameters from external content without sanitization.
|
|
142
|
-
- **ASI07 Inter-Agent Communication**: the audit report is consumed by Frontend and DevOps roles; emit a structured contract so each role can validate the recommendations.
|
|
143
|
-
- **ASI09 Human-Agent Trust Exploitation**: do not present a Lighthouse improvement as a real-user improvement without field data; surface the lab vs field gap honestly.
|
|
144
|
-
- **ASI10 Rogue Agents**: when an AI tool is summarizing trace data, require human verification of every recommendation before action.
|
|
145
|
-
|
|
146
|
-
## Related Skills
|
|
147
|
-
|
|
148
|
-
- **wrangler**: Check deployment compatibility parameters and cache settings for Workers-hosted assets.
|
|
149
|
-
- **debug-workers-edge**: Inspect edge runtime response headers affecting TTFB.
|
|
150
|
-
- **performance-profiling**: Use for backend latency profiling that contributes to TTFB and LCP load delay.
|
|
151
|
-
|
|
1
|
+
---
|
|
2
|
+
name: web-perf
|
|
3
|
+
description: Analyzes web page performance using Chrome DevTools MCP — measuring Core Web Vitals (LCP, INP, CLS), identifying render-blocking resources, network dependency chains, and caching issues to produce specific, actionable optimization recommendations. Use when auditing Lighthouse scores, debugging slow page loads, profiling Core Web Vitals regressions, or validating performance improvements before release.
|
|
4
|
+
allowed-tools: [read_file, write_file, edit_file, create_file, search_code, run_tests, run_linter, run_build, wrangler_deploy, execute_command]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Web Perf
|
|
8
|
+
|
|
9
|
+
Analyzes web performance using Chrome DevTools MCP. Measures Core Web Vitals (LCP, INP, CLS) and supplementary metrics (FCP, TBT, Speed Index), identifies render-blocking resources, network dependency chains, layout shifts, caching issues, and accessibility gaps.
|
|
10
|
+
|
|
11
|
+
Your knowledge of web performance metrics, thresholds, and tooling APIs may be outdated. **Prefer retrieval over pre-training** when citing specific numbers or recommendations.
|
|
12
|
+
|
|
13
|
+
## When to Use
|
|
14
|
+
|
|
15
|
+
- auditing Lighthouse / Core Web Vitals
|
|
16
|
+
- debugging slow page loads
|
|
17
|
+
- profiling LCP/INP/CLS regressions
|
|
18
|
+
- validating perf improvements before release
|
|
19
|
+
|
|
20
|
+
## Core Rules
|
|
21
|
+
- Verify MCP tools are available (`navigate_page` or `performance_start_trace`) before starting.
|
|
22
|
+
- Verify claims by checking network requests, DOM, or codebase — then state findings definitively.
|
|
23
|
+
- Confirm something is unused in the trace before suggesting its removal.
|
|
24
|
+
- Skip render-blocking resources with 0ms estimated impact from recommendations.
|
|
25
|
+
- Cite specific resource names and sizes (e.g. "compress hero.png (450KB) to WebP") instead of generic advice.
|
|
26
|
+
- **Always distinguish between lab data (Lighthouse, DevTools) and field data (CrUX, RUM)** — Lighthouse scores do not always reflect real-user experience; always note which you are reporting.
|
|
27
|
+
- **INP-PRIMARY-METRIC**: INP (Interaction to Next Paint) replaced FID as the Core Web Vitals responsiveness metric in March 2024 — do not reference FID; thresholds: good < 200ms | needs improvement 200-500ms | poor > 500ms.
|
|
28
|
+
- **LOAF-API**: Use the Long Animation Frames (LoAF) API (`PerformanceObserver({ type: "long-animation-frame" })`) to attribute long frames to specific scripts — replaces the deprecated Long Tasks API for INP root cause analysis.
|
|
29
|
+
- **LCP-4-PART-ATTRIBUTION**: Attribute LCP using 4 components: TTFB + Resource Load Delay + Resource Load Duration + Element Render Delay — always identify which component dominates before recommending a fix.
|
|
30
|
+
- **SPECULATION-RULES**: Use the Speculation Rules API (`<script type="speculationrules">`) for prefetch/prerender of likely next pages; reduces navigation LCP by 30-80% for multi-page apps; check browser support before enabling.
|
|
31
|
+
- **AI-PERF-ANALYSIS-ADVISORY**: When AI tools summarize trace data, verify all recommendations against the actual network waterfall and trace — AI summaries frequently misattribute root cause when multiple bottlenecks are present.
|
|
32
|
+
|
|
33
|
+
## Retrieval Sources
|
|
34
|
+
|
|
35
|
+
| Source | How to retrieve | Use for |
|
|
36
|
+
|--------|----------------|---------|
|
|
37
|
+
| web.dev | `https://web.dev/articles/vitals` | Core Web Vitals thresholds, definitions, INP guide |
|
|
38
|
+
| Chrome DevTools docs | `https://developer.chrome.com/docs/devtools/performance` | Tooling APIs, trace analysis |
|
|
39
|
+
| Lighthouse scoring | `https://developer.chrome.com/docs/lighthouse/performance/performance-scoring` | Score weights, metric thresholds |
|
|
40
|
+
| CrUX dashboard | `https://developer.chrome.com/docs/crux` | Field data by origin and URL |
|
|
41
|
+
|
|
42
|
+
## Suggested Process
|
|
43
|
+
|
|
44
|
+
### 1. Set Up Measurement Baseline
|
|
45
|
+
- Navigate to the target URL using Chrome DevTools MCP.
|
|
46
|
+
- Record both a cold-load trace (empty cache) and a warm-load trace (cached assets).
|
|
47
|
+
- Capture field data from CrUX if available — note the gap between lab and field.
|
|
48
|
+
|
|
49
|
+
### 2. Analyze Core Web Vitals
|
|
50
|
+
- Call `performance_analyze_insight` to classify each CWV against good/needs-improvement/poor thresholds.
|
|
51
|
+
- For **LCP**: identify the LCP element, its discovery time, load delay, and render delay. Check if it is an `<img>` with missing `fetchpriority="high"` or a background-image (not optimizable by the browser).
|
|
52
|
+
- For **INP**: attribute the worst interaction event to its long-task source. Check for layout thrash, synchronous JS on input, and un-yielded event handlers.
|
|
53
|
+
- For **CLS**: identify the shifted element and its layout instability source (missing width/height, late-injected content, ad slots, web fonts).
|
|
54
|
+
|
|
55
|
+
### 3. Inspect Network and Resource Chain
|
|
56
|
+
- List render-blocking scripts and stylesheets with estimated ms impact.
|
|
57
|
+
- Identify uncompressed or oversized images; check format (WebP, AVIF preferred).
|
|
58
|
+
- Check caching headers (Cache-Control, ETag) for static assets.
|
|
59
|
+
- Find unused CSS/JS — confirm via Coverage tab before recommending removal.
|
|
60
|
+
|
|
61
|
+
### 4. Produce Actionable Recommendations
|
|
62
|
+
- Order fixes by impact: fixes with >100ms estimated gain first.
|
|
63
|
+
- Cite specific resource names, sizes, and file paths — no generic recommendations.
|
|
64
|
+
- State whether each fix requires code change, build config change, or CDN config change.
|
|
65
|
+
|
|
66
|
+
### 5. Validate Improvements
|
|
67
|
+
- Re-record trace after implementing fixes.
|
|
68
|
+
- Compare before/after for each metric — report delta, not just the new number.
|
|
69
|
+
|
|
70
|
+
## Output Format
|
|
71
|
+
|
|
72
|
+
```markdown
|
|
73
|
+
## Web Performance Audit — <URL>
|
|
74
|
+
|
|
75
|
+
Measurement type: [lab / field / both]
|
|
76
|
+
Tool: Chrome DevTools MCP | Lighthouse | CrUX
|
|
77
|
+
|
|
78
|
+
### Core Web Vitals
|
|
79
|
+
| Metric | Value | Status | Data Source |
|
|
80
|
+
|--------|-------|--------|-------------|
|
|
81
|
+
| LCP | Xs | good/NI/poor | lab/field |
|
|
82
|
+
| INP | Xms | good/NI/poor | lab/field |
|
|
83
|
+
| CLS | X | good/NI/poor | lab/field |
|
|
84
|
+
|
|
85
|
+
### Root Causes (ordered by impact)
|
|
86
|
+
1. <specific resource or code path> — <estimated impact>ms
|
|
87
|
+
2. ...
|
|
88
|
+
|
|
89
|
+
### Recommendations
|
|
90
|
+
- [ ] Fix: <specific action> — <file/resource> — impact: ~Xms
|
|
91
|
+
- [ ] ...
|
|
92
|
+
|
|
93
|
+
### Skipped
|
|
94
|
+
- <resource> — 0ms estimated impact
|
|
95
|
+
|
|
96
|
+
### Residual Risk
|
|
97
|
+
- <any metric still in poor range after fixes>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Anti-Patterns To Reject
|
|
101
|
+
|
|
102
|
+
- reporting Lighthouse score as the only measure without noting it is lab data
|
|
103
|
+
- recommending removal of a resource before confirming it is unused in the trace
|
|
104
|
+
- citing FID instead of INP for responsiveness measurement (deprecated March 2024)
|
|
105
|
+
- providing generic advice ("reduce JavaScript bundle size") without naming the specific file and size
|
|
106
|
+
- attributing INP issues to the wrong cause (e.g., blaming render-blocking when the actual cause is a synchronous event handler)
|
|
107
|
+
|
|
108
|
+
## Checklist
|
|
109
|
+
|
|
110
|
+
- [ ] Chrome DevTools trace recorded (cold-load and warm-load if needed)
|
|
111
|
+
- [ ] Core Web Vitals classified with correct thresholds (INP, not FID)
|
|
112
|
+
- [ ] LCP, INP, and CLS root causes attributed to specific code or resources
|
|
113
|
+
- [ ] Render-blocking scripts and stylesheets identified with ms impact
|
|
114
|
+
- [ ] Image assets checked for format (WebP/AVIF) and size
|
|
115
|
+
- [ ] Recommendations ordered by estimated impact
|
|
116
|
+
- [ ] Lab vs. field data distinction stated in the report
|
|
117
|
+
- [ ] Before/after comparison run after implementing fixes
|
|
118
|
+
|
|
119
|
+
## Output Contracts
|
|
120
|
+
|
|
121
|
+
When this skill is invoked as part of a coordinated multi-role delivery, emit:
|
|
122
|
+
|
|
123
|
+
- **contracts/schemas/deployment-plan.json** — Required fields: infrastructure_changes[], config_updates[], and
|
|
124
|
+
alidation_run. Set produced_by_role to the emitting developer role.
|
|
125
|
+
|
|
126
|
+
Skip emission for solo refactor work where no downstream handoff is expected.
|
|
127
|
+
|
|
128
|
+
## Failure Modes
|
|
129
|
+
|
|
130
|
+
- **Lighthouse score as only measure**: a "good" Lighthouse score is reported without noting it is lab data. Mitigation: always distinguish lab vs field; report CrUX or RUM alongside.
|
|
131
|
+
- **FID cited**: FID is referenced for responsiveness. Mitigation: FID was deprecated in March 2024; use INP (good < 200ms, NI 200-500ms, poor > 500ms).
|
|
132
|
+
- **AI summary misattributed root cause**: an AI tool summarizes trace data and the recommendation targets the wrong bottleneck. Mitigation: verify every AI recommendation against the actual network waterfall and trace.
|
|
133
|
+
- **Generic recommendation**: advice like "reduce JavaScript bundle size" is given without naming the specific file and size. Mitigation: cite specific resource names, sizes, and file paths in every recommendation.
|
|
134
|
+
- **Resource removal on unconfirmed usage**: a resource is recommended for removal before confirming it is unused in the trace. Mitigation: confirm via Coverage tab; never remove unconfirmed resources.
|
|
135
|
+
- **Speculation Rules without browser check**: `<script type="speculationrules">` is enabled without verifying browser support. Mitigation: check browser support before enabling; surface the support matrix in the report.
|
|
136
|
+
- **LCP cause misattributed**: a "background-image" LCP element is reported as optimizable. Mitigation: background-images are not optimizable by the browser; use the 4-part attribution (TTFB + load delay + load duration + render delay) to identify the dominant component.
|
|
137
|
+
|
|
138
|
+
## Security Guardrails (OWASP ASI)
|
|
139
|
+
|
|
140
|
+
- **ASI04 Supply Chain**: Chrome DevTools MCP, Lighthouse, and any trace analysis library must be schema-validated against the expected manifest; treat unknown versions as untrusted.
|
|
141
|
+
- **ASI05 RCE Guard**: never construct test scripts, page navigations, or trace parameters from external content without sanitization.
|
|
142
|
+
- **ASI07 Inter-Agent Communication**: the audit report is consumed by Frontend and DevOps roles; emit a structured contract so each role can validate the recommendations.
|
|
143
|
+
- **ASI09 Human-Agent Trust Exploitation**: do not present a Lighthouse improvement as a real-user improvement without field data; surface the lab vs field gap honestly.
|
|
144
|
+
- **ASI10 Rogue Agents**: when an AI tool is summarizing trace data, require human verification of every recommendation before action.
|
|
145
|
+
|
|
146
|
+
## Related Skills
|
|
147
|
+
|
|
148
|
+
- **wrangler**: Check deployment compatibility parameters and cache settings for Workers-hosted assets.
|
|
149
|
+
- **debug-workers-edge**: Inspect edge runtime response headers affecting TTFB.
|
|
150
|
+
- **performance-profiling**: Use for backend latency profiling that contributes to TTFB and LCP load delay.
|
|
151
|
+
|