Back to list
doanchienthangdev

profiling-performance

by doanchienthangdev

Omega Vibecode Kit

2🍴 1📅 Jan 21, 2026

SKILL.md


name: profiling-performance description: Performs browser performance profiling with Lighthouse, Core Web Vitals, and DevTools analysis. Use when auditing page performance, optimizing Core Web Vitals, analyzing bundle sizes, or implementing performance budgets. category: devops triggers:

  • performance
  • lighthouse
  • core web vitals
  • bundle size
  • profiling

Profiling Performance

Quick Start

// Run Lighthouse audit
import lighthouse from 'lighthouse';
import * as chromeLauncher from 'chrome-launcher';

async function audit(url: string) {
  const chrome = await chromeLauncher.launch({ chromeFlags: ['--headless'] });
  const result = await lighthouse(url, { port: chrome.port, onlyCategories: ['performance'] });
  await chrome.kill();
  return result?.lhr;
}
# CLI audit
npx lighthouse https://example.com --output=json --output-path=./report.json

Features

FeatureDescriptionGuide
Lighthouse AuditsAutomated performance scoringRun in CI/CD, track scores over time
Core Web VitalsLCP, FID, CLS, INP metricsMonitor with web-vitals library
Bundle AnalysisJavaScript bundle size inspectionUse webpack-bundle-analyzer or rollup-plugin-visualizer
Network WaterfallRequest timing and blocking analysisIdentify render-blocking resources
Memory ProfilingHeap snapshots and leak detectionCompare snapshots before/after operations
Performance BudgetsAutomated regression preventionSet thresholds in CI pipeline

Common Patterns

Core Web Vitals Monitoring

import { onLCP, onFID, onCLS, onINP } from 'web-vitals';

function sendToAnalytics(metric: { name: string; value: number; rating: string }) {
  analytics.track('web_vital', metric);
}

onLCP(sendToAnalytics);  // Target: < 2.5s
onFID(sendToAnalytics);  // Target: < 100ms
onCLS(sendToAnalytics);  // Target: < 0.1
onINP(sendToAnalytics);  // Target: < 200ms

Performance Budget Check

const BUDGET = {
  lcp: 2500, fid: 100, cls: 0.1, tti: 3800, tbt: 200,
  jsSize: 300 * 1024, cssSize: 50 * 1024, totalSize: 1000 * 1024,
};

function checkBudget(metrics: Record<string, number>) {
  const violations = Object.entries(BUDGET)
    .filter(([key, limit]) => metrics[key] > limit)
    .map(([key, limit]) => ({ metric: key, limit, actual: metrics[key] }));
  return { passed: violations.length === 0, violations };
}

CI/CD Integration

# .github/workflows/performance.yml
- name: Lighthouse CI
  uses: treosh/lighthouse-ci-action@v10
  with:
    urls: http://localhost:3000
    budgetPath: ./performance-budget.json
    uploadArtifacts: true

Best Practices

DoAvoid
Test with throttled network and CPUTesting only on fast connections
Monitor real user metrics (RUM)Relying solely on synthetic tests
Set and enforce performance budgetsOptimizing without baseline data
Preload LCP images with fetchpriorityIgnoring mobile performance
Lazy load below-fold contentLoading all JS upfront
Use modern image formats (WebP, AVIF)Ignoring third-party script impact
Profile before and after changesSkipping cumulative layout shift fixes

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

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

+20
LICENSE

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

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

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

0/5
Issue管理

オープンIssueが50未満

+5
言語

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

+5
タグ

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

0/5

Reviews

💬

Reviews coming soon