core-web-vitals · davila7 — Claude Code skill: metrics and setup
This skill examines LCP, INP, and CLS and suggests code changes for loading, responsiveness, and layout stability. Use it when diagnosing weak page metrics.
npx claude-code-templates@latest --skill development/core-web-vitalsWhat core-web-vitals does
The skill covers three Core Web Vitals: LCP for when the main visible content appears, INP for responses to user actions, and CLS for unexpected layout movement. It connects each metric to common code-level causes and suggests changes, such as prioritizing a key image, splitting long tasks, or reserving space for images.
For LCP, the guidance discusses slow server responses, render-blocking resources, and client-side rendering delays. INP examples cover long main-thread tasks, costly event handlers, third-party scripts, and unnecessary React or Vue re-renders. The examples include HTML and JavaScript; the recommended fixes depend on which metric is affected.
What it helps with
- trace delays in rendering the main visible element
- reduce lag after clicks and other interactions
- identify causes of unexpected layout movement
- choose code changes for LCP, INP, or CLS
Example prompts for the agent
- Find why the main content appears late and suggest ways to improve LCP.
- Inspect what makes clicks feel delayed and recommend changes for INP.
- Look for causes of unexpected page shifts and suggest ways to reduce CLS.
How to install core-web-vitals
1claude-code-templates
npx claude-code-templates@latest --skill development/core-web-vitals2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill core-web-vitals -a claude-code3Manually: put the files in place
~/.claude/skills/core-web-vitals/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/core-web-vitals/
Manually: put the files in place
.agents/skills/core-web-vitals/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/core-web-vitals/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates core-web-vitals2Manually: put the files in place
.github/skills/core-web-vitals/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/development/core-web-vitalsManually: put the files in place
.devin/skills/core-web-vitals/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about core-web-vitals
How do I install core-web-vitals in Claude Code?
Run npx claude-code-templates@latest --skill development/core-web-vitals.
What does core-web-vitals do?
It helps diagnose LCP, INP, and CLS issues and suggests code changes for common causes of poor results.
Which INP issues does core-web-vitals cover?
It discusses long main-thread tasks, costly event handlers, third-party scripts, and excessive re-renders.
Similar skills
All skills for Frontend and UI →core-web-vitals by other authors comes first.