zer09/pi-config.bak/debug-optimize-lcp
Claude Code and agent skill by zer09/pi-config.bak
- community
Checking that the SKILL.md file is still in the repository.
Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions "largest contentful paint", "page load speed", "CWV", or wants to improve how fast their hero image or main content renders.
Install
npx vskill@latest install zer09/pi-config.bak/debug-optimize-lcpSKILL.md
The same SKILL.md was published earlier as zer09/pi-config.bak/debug-optimize-lcp.
Debug and optimize LCP
Use Chrome DevTools MCP to find the Largest Contentful Paint element, split LCP into subparts, identify the bottleneck, and verify the fix.
Targets
- Good LCP: <= 2.5 seconds.
- Needs improvement: 2.5 to 4.0 seconds.
- Poor: > 4.0 seconds.
LCP has four ordered subparts: TTFB, resource load delay, resource load duration, and element render delay. The delay subparts should be near zero; optimize the largest bottleneck first.
Workflow
- Navigate to the target page and record a reload trace with
performance_start_traceusingreload: trueandautoStop: true. - Run
performance_analyze_insighton the relevant insight set. Start withLCPBreakdown, then checkDocumentLatency,RenderBlocking, andLCPDiscoveryas needed. - Identify the actual LCP element with the snippet in
references/lcp-snippets.md. Note the tag, resource URL, and timing data. - Inspect the network waterfall with
list_network_requestsandget_network_request, focusing on the LCP resource, HTML document, images, fonts, and render-blocking assets. - Audit common HTML issues with
references/lcp-snippets.md: lazy-loaded viewport images, missingfetchpriority, late discovery through CSS or JS, and blocking scripts/styles. - Recommend the smallest fix that targets the bottleneck, then rerun the trace to verify the subpart improved.
Optimization map
- High TTFB: reduce redirects, cache HTML at the edge, improve server response, and check bfcache eligibility.
- Resource load delay: expose the LCP resource in initial HTML, remove lazy loading from the LCP image, add preload or
fetchpriority="high"when appropriate. - Resource load duration: shrink or transcode the resource, use responsive images, serve from a CDN, and improve caching.
- Element render delay: inline critical CSS, defer non-critical scripts/styles, reduce long tasks, and ensure server-rendered or initial HTML content exists early.
References
references/lcp-snippets.md- reusable scripts for LCP element detection and common issue audits.references/lcp-breakdown.md- subpart interpretation.references/optimization-strategies.md- fix selection.references/elements-and-size.md- LCP element type and size notes.
Maintenance
For future updates to this source, read ../../../docs/skills/chrome-devtools-skills-update-process.md.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagent/skills/debug-optimize-lcp/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/zer09/pi-config.bak/debug-optimize-lcp)