← Back to list

performance-testing-patterns
by ak-eyther
A project to copy paste the entire settings
⭐ 0🍴 0📅 Jan 6, 2026
SKILL.md
name: performance-testing-patterns description: Performance testing using Chrome DevTools, Lighthouse, and Core Web Vitals monitoring. Use for performance profiling or optimization validation. allowed-tools:
- Read
- Bash
Performance Testing Patterns
Lighthouse CI
# Install
npm install -D @lhci/cli
# Run lighthouse
lhci autorun
# lighthouse.config.js
module.exports = {
ci: {
collect: {
url: ['http://localhost:3000'],
numberOfRuns: 3,
},
assert: {
preset: 'lighthouse:recommended',
assertions: {
'categories:performance': ['error', { minScore: 0.9 }],
'categories:accessibility': ['error', { minScore: 0.9 }],
},
},
},
}
Core Web Vitals
// Measure CWV in tests
test('page meets Core Web Vitals', async ({ page }) => {
await page.goto('/')
const metrics = await page.evaluate(() => {
return new Promise((resolve) => {
new PerformanceObserver((list) => {
const entries = list.getEntries()
const lcp = entries.find(e => e.entryType === 'largest-contentful-paint')
const fid = entries.find(e => e.entryType === 'first-input')
const cls = entries.find(e => e.entryType === 'layout-shift')
resolve({ lcp: lcp?.startTime, fid: fid?.processingStart, cls: cls?.value })
}).observe({ entryTypes: ['largest-contentful-paint', 'first-input', 'layout-shift'] })
})
})
expect(metrics.lcp).toBeLessThan(2500) // Good LCP < 2.5s
})
Bundle Analysis
# Next.js bundle analyzer
npm install -D @next/bundle-analyzer
# next.config.js
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
module.exports = withBundleAnalyzer({
// config
})
# Run analysis
ANALYZE=true npm run build
Performance Budget
// budget.json
[
{
"path": "/*",
"resourceSizes": [
{ "resourceType": "script", "budget": 300 },
{ "resourceType": "total", "budget": 500 }
]
}
]
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