diagnosing-lcp

diagnosing-lcp is a skill for Claude Code from corewebvitals/cwv-superpowers. It costs 89 tokens per session (2,935 once invoked), scanned A, original, MIT.

A diagnosis method for slow Largest Contentful Paint, or LCP—the time until the main visible page content appears. It identifies the main page element, the delayed loading phase, the likely cause, and recent trends from real-user measurements.

In plain words
What is it for?
Use it to analyze LCP for a selected page and device, including the element causing the measurement, its priority, loading phases, distribution, and seven-day trend.
Why use it?
It turns a poor LCP result into a specific element and delay category that can be investigated or fixed.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the cwv-superpowers plugin — 6 skills, 1 hook shipped together

Good fit Use it to analyze LCP for a selected page and device, including the element causing the measurement, its priority, loading phases, distribution, and seven-day trend.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/corewebvitals/cwv-superpowers/diagnosing-lcp
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add corewebvitals/cwv-superpowers --skill diagnosing-lcp
Clone the repo
git clone --depth 1 https://github.com/corewebvitals/cwv-superpowers

Made for: Claude Code.

Or install cwv-superpowers, the plugin that ships this one along with the rest of its 6 skills, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for diagnosing-lcp

README.md
[![agentmods](https://agentmods.dev/badge/skills/corewebvitals/cwv-superpowers/diagnosing-lcp/github.svg)](https://agentmods.dev/skills/corewebvitals/cwv-superpowers/diagnosing-lcp)
Your own site
<a href="https://agentmods.dev/skills/corewebvitals/cwv-superpowers/diagnosing-lcp"><img src="https://agentmods.dev/badge/skills/corewebvitals/cwv-superpowers/diagnosing-lcp/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for diagnosing-lcp

Your own site · 80×15
<a href="https://agentmods.dev/skills/corewebvitals/cwv-superpowers/diagnosing-lcp"><img src="https://agentmods.dev/badge/skills/corewebvitals/cwv-superpowers/diagnosing-lcp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,935 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00089 $0.02935
Opus 5 $0.00044 $0.01468
Sonnet 5 $0.00018 $0.00587
Haiku 4.5 $0.00009 $0.00294

Measured 9d ago against content hash ed369d1134f2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

diagnosing-lcp scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/cwv-superpowers/skills/diagnosing-lcp/SKILL.md · 274 lines

How it starts

The opening of the file, as written. The whole thing — 274 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Diagnosing LCP

Invocation

Called by the cwv-superpower orchestrator at Step 2B, or invoked directly when the user names LCP as the target metric.

Inputs: a target filter (ff or u with value) and a device (default: mobile).

Run the attribution, breakdown, and trend calls below, then interpret results.

Progress: Print these sub-status lines as you execute each call:

   ↳ Identifying LCP element...
   ↳ Checking element type...
   ↳ Checking priority state...
   ↳ Breaking down LCP phases...
   ↳ Analyzing distribution shape... (if warranted)
   ↳ Checking 7-day trend...

Attribution calls

Use [FILTER_KEY] and [FILTER_VALUE] as placeholders — SKILL.md fills these based on the selected page filter.

1. LCP Element (CSS selector)

get_metrics with:
  metrics: "LCP"
  group: "lcpel"
  [FILTER_KEY]: "[FILTER_VALUE]"
  d: "mobile"

Identifies the LCP element as a CSS selector. The top result by traffic volume is the most common LCP element on the page. Use this to know exactly which DOM element is the LCP.

2. Element Type

get_metrics with:
  metrics: "LCP"
  group: "lcpet"
  [FILTER_KEY]: "[FILTER_VALUE]"
  d: "mobile"

Returns the type of the LCP element. Possible values: image, text, background-image, video. This determines which optimization strategies apply — image LCPs have different fixes than text LCPs.

3. Priority State

get_metrics with:
  metrics: "LCP"
  group: "lcpprio"
  [FILTER_KEY]: "[FILTER_VALUE]"
  d: "mobile"

Returns the priority/loading state of the LCP resource. Values:

Value Meaning
0 Not an image
1 Preloaded
2 High fetchpriority
3 Not preloaded
4 Lazy loaded

Key insight: Priority 3 (not preloaded) is the most common fixable LCP issue — the image exists but the browser discovers it late. Priority 4 (lazy loaded) is actively harmful for LCP because loading="lazy" defers the load until the element is near the viewport, which directly delays the largest paint.

Read the full file on GitHub · 274 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 274 lines · 89 tokens per session scan A ed369d1134f2

Subscribe to this mod's changes

diagnosing-lcp is a skill published in the GitHub repository corewebvitals/cwv-superpowers (12 stars, last pushed 2mo ago), licensed MIT. It adds 89 tokens to every session and 2,935 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

inspecting-hermes-desktop-dom

Read the live Hermes desktop DOM/CSS over CDP.

NousResearch/hermes-agent · 20 tokens

a11y-debugging

Uses Chrome DevTools MCP for accessibility (a11y) debugging and auditing based on web.dev guidelines. Use when testing semantic HTML, ARIA labels, focus states, keyboard navigation, tap targets, and color contrast.

ChromeDevTools/chrome-devtools-mcp · 50 tokens

devtools

Drop-in inspector panel for any json-render app. Use when the user wants to debug a generative UI, inspect the spec tree, edit state at runtime, see dispatched actions, follow stream patches live, browse a catalog, or pick DOM elements to find their spec keys. Triggers include "add devtools", "debug json-render"…

vercel-labs/json-render · 108 tokens

copilotkit-debug

Use when diagnosing CopilotKit issues -- runtime connectivity failures, agent not responding, streaming errors, tool execution problems, transcription failures, version mismatches, and AG-UI event tracing.

CopilotKit/CopilotKit · 42 tokens

migrate-oxlint

Guide for migrating a project from ESLint to Oxlint. Use when asked to migrate, convert, or switch a JavaScript/TypeScript project's linter from ESLint to Oxlint.

oxc-project/oxc · 44 tokens

debug-optimize-lcp

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…

ChromeDevTools/chrome-devtools-mcp · 99 tokens