スキル一覧に戻る
nexus-labs-automation

core-web-vitals

by nexus-labs-automation

Claude Code plugin for web observability - Core Web Vitals, error tracking, session replay for React, Vue, Svelte, and more

0🍴 0📅 2025年12月26日
GitHubで見るManusで実行

SKILL.md


name: core-web-vitals description: Measure and optimize Core Web Vitals (LCP, INP, CLS). Use when implementing CWV tracking or debugging performance. triggers:

  • "core web vitals"
  • "LCP optimization"
  • "INP tracking"
  • "CLS issues" priority: 1

Core Web Vitals

Measure the three metrics Google uses to assess user experience.

The Three Metrics

MetricMeasuresGoodPoor
LCPLoading - Largest Contentful Paint≤2.5s>4.0s
INPInteractivity - Interaction to Next Paint≤200ms>500ms
CLSVisual Stability - Cumulative Layout Shift≤0.1>0.25

Key Principles

  1. Always include attribution - Without it, you can't debug
  2. Track all three - INP replaced FID, don't skip it
  3. Track by route - Aggregate data hides problems
  4. Alert on poor vitals - Don't just log, enable alerts

Attribution = Actionable

WithoutWith
"LCP is 3.2s""LCP is 3.2s, caused by hero-image.jpg"
Can't fixActionable

Common Causes

LCP

  • Large hero images → Optimize, preload
  • Slow TTFB → CDN, improve server
  • Render-blocking resources → Defer non-critical

INP

  • Long JS tasks → Break into chunks
  • Heavy event handlers → Debounce
  • Third-party scripts → Defer, lazy load

CLS

  • Images without dimensions → Set width/height
  • Dynamic content → Reserve space
  • Web fonts → font-display: optional

Implementation

See templates/web-vitals.ts for production-ready code.

Use Read tool to load template when generating implementation.

Anti-Patterns

See references/anti-patterns.md for:

  • CWV without attribution
  • Missing INP tracking
  • Blocking main thread with telemetry
  • skills/hydration-performance - SSR impact on LCP
  • skills/bundle-performance - JS impact on INP
  • references/core-web-vitals.md - Deep dive

スコア

総合スコア

70/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です