Diagnostica y resuelve fugas de memoria en aplicaciones JavaScript/Node.js capturando, comparando e inspeccionando heap snapshots.
- Costo de contexto al activarse
- 1k tok
- Tamaño del paquete
- 2 archivos
- Última actualización
- ayer
Guía la depuración y optimización del Largest Contentful Paint (LCP) usando las herramientas de Chrome DevTools MCP.
en todo el repo
0–100, la ruta de este skill
último commit aquí
últimos 90 días
110 tok en reposo
15 KB
Funciona con cualquier agente que lea SKILL.md
npx -y skills add ChromeDevTools/chrome-devtools-mcp --skill debug-optimize-lcp --agent claude-codeSe instala solo en este repositorio.
Di cualquiera de estas frases y el agente debería cargar este skill.
Largest Contentful Paint (LCP) measures how quickly a page's main content becomes visible. It's the time from navigation start until the largest image or text block renders in the viewport.
LCP is a Core Web Vital that directly affects user experience and search ranking. On 73% of mobile pages, the LCP element is an image.
Every page's LCP breaks down into four sequential subparts with no gaps or overlaps. Understanding which subpart is the bottleneck is the key to effective optimization.
| Subpart | Ideal % of LCP | What it measures |
|---|---|---|
| Time to First Byte (TTFB) | ~40% | Navigation start → first byte of HTML received |
| Resource load delay | <10% | TTFB → browser starts loading the LCP resource |
| Resource load duration | ~40% | Time to download the LCP resource |
| Element render delay | <10% | LCP resource downloaded → LCP element rendered |
The "delay" subparts should be as close to zero as possible. If either delay subpart is large relative to the total LCP, that's the first place to optimize.
Common Pitfall: Optimizing one subpart (like compressing an image to reduce load duration) without checking others. If render delay is the real bottleneck, a smaller image won't help — the saved time just shifts to render delay.
Follow these steps in order. Each step builds on the previous one.
Navigate to the page, then record a trace with reload to capture the full page load including LCP:
navigate_page with pageId to the target URL.performance_start_trace with pageId, reload: true and autoStop: true.The trace results will include LCP timing and available insight sets. Note the insight set IDs from the output — you'll need them in the next step.
Use performance_analyze_insight to drill into LCP-specific insights. Look for these insight names in the trace results:
Call performance_analyze_insight with pageId, the insight set ID, and the insight name from the trace results.
Use evaluate_script (with pageId) and the "Identify LCP Element" snippet found in references/lcp-snippets.md to reveal the LCP element's tag, resource URL, and raw timing data.
The url field tells you what resource to look for in the network waterfall. If url is empty, the LCP element is text-based (no resource to load).
Use list_network_requests to see when the LCP resource loaded relative to other resources:
list_network_requests with pageId filtered by resourceTypes: ["Image", "Font"] (adjust based on Step 3).get_network_request with pageId and the LCP resource's request ID for full details.Key Checks:
Use evaluate_script (with pageId) and the "Audit Common Issues" snippet found in references/lcp-snippets.md to check for lazy-loaded images in the viewport, missing fetchpriority, and render-blocking scripts.
After identifying the bottleneck subpart, apply these prioritized fixes.
The most common bottleneck. The LCP resource should start loading immediately.
data-src usage, or loading="lazy".<img> with src. Never lazy-load the LCP image.<link rel="preload" fetchpriority="high"> if the image isn't discoverable in HTML.fetchpriority="high" to the LCP <img> tag.The element should render immediately after loading.
<head>, or main thread blocking.Make the resource smaller or faster to deliver.
srcset).Cache-Control headers.font-display: swap if LCP is text blocked by a web font.The HTML document itself takes too long to arrive.
performance_start_trace with pageId and reload: true) and compare the new subpart breakdown. The bottleneck should shrink.emulate to test under constraints:emulate with pageId, networkConditions: "Fast 3G" and cpuThrottlingRate: 4.Reproducido de ChromeDevTools/chrome-devtools-mcp bajo licencia Apache-2.0. Leer esta página en markdown.
5 archivos en el paquete. Solo se lee SKILL.md al activarse — las referencias se cargan si el skill decide que las necesita.
Requiere las herramientas MCP de Chrome DevTools (navigate_page, performance_start_trace, evaluate_script, list_network_requests, emulate).
Este repo incluye 6 skills. Si instalas uno, normalmente ya tienes los demás.
Diagnostica y resuelve fugas de memoria en aplicaciones JavaScript/Node.js capturando, comparando e inspeccionando heap snapshots.
Usa Chrome DevTools vía MCP para depuración eficiente, resolución de problemas y automatización del navegador. No aplica al modo --slim de configuración MCP.
Usa este skill para escribir scripts de shell o correr comandos de shell que automaticen el navegador u otras tareas de Chrome DevTools por CLI.
Usa Chrome DevTools MCP y su documentación para solucionar problemas de conexión y de target cuando fallan list_pages, new_page o navigate_page.
Usa Chrome DevTools por MCP para depuración y auditoría de accesibilidad (a11y) siguiendo las guías de web.dev. Úsalo al probar HTML semántico, ARIA, foco, teclado, tap targets y contraste.
Usa Chrome DevTools vía MCP para depuración eficiente, resolución de problemas y automatización del navegador. No aplica al modo --slim de configuración MCP.
Usa este skill para escribir scripts de shell o correr comandos de shell que automaticen el navegador u otras tareas de Chrome DevTools por CLI.
Diagnostica y resuelve fugas de memoria en aplicaciones JavaScript/Node.js capturando, comparando e inspeccionando heap snapshots.