Use Chrome DevTools MCP to find the actual LCP element, identify which LCP subpart is slow, and verify that fixes reduce the bottleneck.
Dispatch
| $ARGUMENTS | Action |
|---|---|
| Empty | Ask for the target URL/page and whether reload is safe |
| Slow page load or Core Web Vitals | Record a trace, analyze LCP insights, then inspect element and network evidence |
| Hero image or main content slow | Identify LCP element, confirm resource discovery, priority, and load timing |
| TTFB concern | Analyze DocumentLatency and request timing before frontend changes |
| Render-blocking concern | Analyze RenderBlocking, scripts, CSS, and main-thread evidence |
| Fix verification | Re-run the trace under the same conditions and compare subpart timings |
LCP Targets
- Good: 2.5 seconds or less.
- Needs improvement: 2.5 to 4.0 seconds.
- Poor: greater than 4.0 seconds.
Debugging Workflow
- Navigate to the page and ensure reload is acceptable.
- Run
performance_start_tracewithreload: trueandautoStop: true. - Record the available insight set IDs from the trace output.
- Run
performance_analyze_insightforLCPBreakdown, thenDocumentLatency,RenderBlocking, orLCPDiscoveryas indicated. - Use
evaluate_scriptwithreferences/lcp-snippets.mdto identify the LCP element and common DOM issues. - Use
list_network_requestsandget_network_requestto inspect the LCP resource timing and priority. - Recommend the smallest fix that targets the slowest subpart.
- Re-run the same trace to verify improvement.
Optimization Order
- Eliminate resource load delay: make the LCP resource discoverable in initial HTML and avoid lazy-loading it.
- Eliminate element render delay: reduce render-blocking CSS/JS and main-thread work.
- Reduce resource load duration: optimize bytes, CDN, caching, and priority.
- Reduce TTFB: remove redirects, cache HTML, and optimize server response time.
Privacy Note
Chrome DevTools MCP performance tooling can use CrUX-related behavior depending on server flags. Respect repo MCP hardening and do not enable extra telemetry or CrUX submission without explicit user intent.
Reference File Index
| File | Content | Read When |
|---|---|---|
references/elements-and-size.md |
Which elements count for LCP and how size is determined | The LCP element is ambiguous |
references/lcp-breakdown.md |
Four LCP subparts and optimization implications | Interpreting trace insights |
references/lcp-snippets.md |
Scripts for LCP element discovery and DOM issue checks | Trace evidence needs DOM confirmation |
references/lcp-fixes.md |
Fixes by LCP subpart | Recommending changes |
references/provenance.md |
Upstream source, commit, license, and adaptation notes | Before modifying this skill or auditing provenance |
Critical Rules
- Identify the slow LCP subpart before recommending a fix.
- Do not optimize bytes before checking resource load delay and render delay.
- Keep trace files out of version control.
- Use the same network and CPU conditions when comparing before and after traces.
- Do not enable extra field-data or telemetry behavior beyond repo MCP policy.
Canonical Vocabulary
| Term | Meaning |
|---|---|
| LCP | Largest Contentful Paint, the render time of the largest visible content element |
| LCP subpart | TTFB, resource load delay, resource load duration, or element render delay |
| Waterfall | Network request timing evidence for the LCP resource |
| Verification trace | A second trace captured under the same conditions after a fix |
Validation Contract
Before declaring skill changes complete, run uv run wagents validate, uv run python skills/skill-creator/scripts/audit.py skills/chrome-devtools-debug-optimize-lcp, and uv run wagents package chrome-devtools-debug-optimize-lcp --dry-run.