Skip to main content
skill CX Codex

web-performance-audit · secondsky — Claude Code skill: Core Web Vitals audit

A skill that audits page speed: pulls Core Web Vitals, finds bottlenecks and points at what to fix. Useful when LCP or CLS drifts out of range.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add secondsky/claude-skills --skill web-performance-audit -a claude-code
Open on GitHub

What web-performance-audit does

The skill ships a threshold table for four metrics: LCP, FID, CLS and INP. Each one has three bands — good, needs improvement, poor. LCP under 2.5s counts as good, over 4s as poor. Those numbers are the starting point when the agent reviews your page.

Inside you get web-vitals snippets for shipping metrics to analytics, plus a Lighthouse runner built on chrome-launcher in headless mode. There is also an audit checklist: capture baseline vitals, run Lighthouse on mobile and desktop, read real user metrics, find the largest contentful element, check for layout shifts, review the JavaScript bundle size and test on a slow connection.

Fixes are grouped by effort. Quick wins take 1-2 days (compression, minification, deferred scripts, WebP and lazy loading). Medium work runs 1-2 weeks (code splitting, service worker caching, preload, removing render-blocking resources). Long-term items stretch over 1-3 months (architecture, CDN, database queries). A JSON performance budget template covers timing and resource-size limits. One catch: the Lighthouse script needs the lighthouse and chrome-launcher npm packages installed, otherwise the automation will not run.

What it helps with

  • capture baseline Core Web Vitals and see where a page falls short
  • find the largest contentful element behind a slow LCP
  • trace what makes the layout jump and pushes CLS up
  • run Lighthouse on mobile and desktop the same way
  • set a performance budget and wire up monitoring alerts

Example prompts for the agent

  • run a performance audit on the landing page and list the metrics outside the good range
  • check the JS bundle and suggest what to split with code splitting
  • find render-blocking resources and lay out fixes for the next two days

How to install web-performance-audit

1Skills CLI (Vercel)

npx skills add secondsky/claude-skills --skill web-performance-audit -a claude-code

2Manually: put the files in place

~/.claude/skills/web-performance-audit/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/web-performance-audit/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about web-performance-audit

How do I install web-performance-audit in Claude?

Run npx skills add secondsky/claude-skills --skill web-performance-audit -a claude-code. The skill file then lands at ~/.claude/skills/web-performance-audit/SKILL.md.

What does web-performance-audit do?

It audits page speed against Core Web Vitals, locates bottlenecks and recommends fixes. The skill bundles metric thresholds, web-vitals snippets and a Lighthouse run.

Which metrics does the skill check?

LCP, FID, CLS and INP. Each metric comes with good, needs-improvement and poor boundaries.

Source text

SKILL.md · MIT
---
name: web-performance-audit
description: Web performance audits with Core Web Vitals, bottleneck identification, optimization recommendations. Use for page load times, performance reviews, UX optimization, or encountering LCP, FID, CLS issues, resource blocking, render delays.
license: MIT
---

# Web Performance Audit

Conduct comprehensive performance audits and implement optimizations.

## Core Web Vitals Targets

| Metric | Good | Needs Improvement | Poor |
|--------|------|-------------------|------|
| LCP (Largest Contentful Paint) | <2.5s | 2.5-4s | >4s |
| FID (First Input Delay) | <100ms | 100-300ms | >300ms |
| CLS (Cumulative Layout Shift) | <0.1 | 0.1-0.25 | >0.25 |
| INP (Interaction to Next Paint) | <200ms | 200-500ms | >500ms |

## Performance Measurement

```javascript
// Using web-vitals library
import { getCLS, getFID, getLCP, getTTFB } from 'web-vitals';

function sendToAnalytics({ name, value, id }) {
  console.log({ name, value, id });
}

getCLS(sendToAnalytics);
getFID(sendToAnalytics);
getLCP(sendToAnalytics);
getTTFB(sendToAnalytics);
```

## Lighthouse Automation

```javascript
const lighthouse = require('lighthouse');
const chromeLauncher = require('chrome-launcher');

async function runAudit(url) {
  const chrome = await chromeLauncher.launch({ chromeFlags: ['--headless'] });
  const result = await lighthouse(url, {
    port: chrome.port,
    onlyCategories: ['performance']
  });

  await chrome.kill();
  return result.lhr;
}
```

## Optimization Strategies

### Quick Wins (1-2 days)
- Enable gzip/brotli compression
- Minify CSS/JS
- Defer non-critical scripts
- Optimize images (WebP, lazy loading)

### Medium Effort (1-2 weeks)
- Implement code splitting
- Add service worker caching
- Preload critical resources
- Eliminate render-blocking resources

### Long-term (1-3 months)
- Architecture improvements
- CDN optimization
- Database query optimization

## Performance Budget

```json
{
  "timings": [
    { "metric": "first-contentful-paint", "budget": 1500 },
    { "metric": "largest-contentful-paint", "budget": 2500 }
  ],
  "resourceSizes": [
    { "resourceType": "script", "budget": 150 },
    { "resourceType": "image", "budget": 300 }
  ]
}
```

## Audit Checklist

- [ ] Measure baseline Core Web Vitals
- [ ] Run Lighthouse audit (mobile & desktop)
- [ ] Analyze real user metrics (RUM)
- [ ] Identify largest contentful element
- [ ] Check for layout shifts
- [ ] Review JavaScript bundle size
- [ ] Test on slow 3G connection
- [ ] Set performance budget
- [ ] Configure monitoring alerts

© secondsky · MIT · secondsky/claude-skills

Similar skills

Everything for Frontend and UI →

web-performance-audit by other authors comes first.

From the same set89

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor