web-perf
Structured 5-phase web performance audit workflow with Core Web Vitals thresholds and actionable optimization recommendations. Use when auditing website…
от oimiragieo★ 48 звёзд на GitHub
Установить web-perf в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Web Performance Audit
Structured 5-phase web performance audit workflow. Diagnose performance bottlenecks, measure Core Web Vitals, and produce actionable optimization recommendations.
When to Apply
Use this skill when:
- Auditing website performance for Core Web Vitals compliance
- Diagnosing slow page loads, high Time to Interactive, or layout shifts
- Optimizing Largest Contentful Paint (LCP), Cumulative Layout Shift (CLS), or Interaction to Next Paint (INP)
- Reviewing frontend code for performance anti-patterns
- Preparing a site for Google's page experience ranking signals
- Optimizing build output for Webpack, Vite, Next.js, or Nuxt
Core Web Vitals Thresholds
| Metric | Good | Needs Improvement | Poor | What It Measures |
|---|---|---|---|---|
| LCP | <= 2.5s | 2.5s - 4.0s | > 4.0s | Loading performance |
| CLS | <= 0.1 | 0.1 - 0.25 | > 0.25 | Visual stability |
| INP | <= 200ms | 200ms - 500ms | > 500ms | Interactivity (replaced FID) |
Additional Performance Metrics
| Metric | Good | Poor | What It Measures |
|---|---|---|---|
| FCP | <= 1.8s | > 3.0s | First content rendered |
| TTFB | <= 800ms | > 1800ms | Server response time |
| TBT | <= 200ms | > 600ms | Main thread blocking |
| Speed Index | <= 3.4s | > 5.8s | Visual completeness over time |
5-Phase Audit Workflow
Phase 1: Performance Trace
Capture a performance trace to establish baseline metrics.
Browser-Based (Chrome DevTools):
- Open Chrome DevTools (F12) > Performance tab
- Click "Record" and reload the page
- Stop recording after page fully loads
- Analyze the flame chart for:
- Long tasks (> 50ms, marked in red)
- Layout thrashing (forced reflow cycles)
- Render-blocking resources
- JavaScript execution bottlenecks
Lighthouse Audit:
# CLI-based Lighthouse audit
npx lighthouse https://example.com --output=json --output-path=./lighthouse-report.json
# With specific categories
npx lighthouse https://example.com --only-categories=performance --output=html
# Mobile simulation (default)
npx lighthouse https://example.com --preset=perf --throttling-method=simulate
Key Trace Indicators:
- Main thread busy time: Should be < 4s total
- Largest task duration: Should be < 250ms
- Script evaluation time: Should be < 2s
- Layout/style recalculation: Should be < 500ms
Phase 2: Core Web Vitals Analysis
Measure each Core Web Vital and identify specific causes.
LCP Diagnosis
LCP measures loading performance -- when the largest content element becomes visible.
Common LCP Elements:
<img>elements (hero images)<video>poster images- Block-level elements with background images
- Text blocks (
<h1>,<p>)
LCP Optimization Checklist:
Preload the LCP resource
<link rel="preload" as="image" href="/hero.webp" fetchpriority="high" />Eliminate render-blocking resources
<!-- Defer non-critical CSS --> <link rel="stylesheet" href="/non-critical.css" media="print" onload="this.media='all'" /> <!-- Async non-critical JS --> <script src="/analytics.js" async></script>Optimize server response time (TTFB)
- Use CDN for static assets
- Enable HTTP/2 or HTTP/3
- Implement server-side caching
- Use streaming SSR where supported
Optimize image delivery
<!-- Modern format with fallback --> <picture> <source srcset="/hero.avif" type="image/avif" /> <source srcset="/hero.webp" type="image/webp" /> <img src="/hero.jpg" alt="Hero" width="1200" height="600" fetchpriority="high" decoding="async" /> </picture>
CLS Diagnosis
CLS measures visual stability -- unexpected layout shifts during page load.
Common CLS Causes:
- Images without explicit dimensions
- Ads or embeds without reserved space
- Dynamically injected content above the fold
- Web fonts causing FOIT/FOUT (Flash of Invisible/Unstyled Text)
CLS Optimization Checklist:
Always set image dimensions
<img src="/photo.jpg" width="800" height="600" alt="Photo" />Or use CSS aspect-ratio:
.hero-image { aspect-ratio: 16 / 9; width: 100%; }Reserve space for dynamic content
.ad-slot { min-height: 250px; } .skeleton { height: 200px; background: #f0f0f0; }Use
font-display: swapwith size-adjust@font-face { font-family: 'CustomFont'; src: url('/font.woff2') format('woff2'); font-display: swap; size-adjust: 100.5%; /* Match fallback font metrics */ }
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Read - 02
Write - 03
Edit - 04
Bash - 05
Glob - 06
Grep
Вложенные файлы
- commands/web-perf.md
- hooks/post-execute.cjs
- hooks/pre-execute.cjs
- references/research-requirements.md
- rules/web-perf.md
- schemas/input.schema.json
- schemas/output.schema.json
- scripts/main.cjs
- templates/implementation-template.md
FAQ
Что делает скилл web-perf?
Structured 5-phase web performance audit workflow with Core Web Vitals thresholds and actionable optimization recommendations. Use when auditing website performance, diagnosing slow page loads, optimizing Core Web Vitals scores, or reviewing frontend performance patterns. Covers Webpack, Vite, Next.js, and Nuxt optimization.
Как установить скилл web-perf?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл web-perf запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
frontend-design
AnthropicGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
webapp-testing
AnthropicToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
brand-guidelines
AnthropicApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
web-artifacts-builder
AnthropicSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…