원클릭으로
lighthouse-audit
Run Lighthouse performance audits on deployed websites. Checks Performance, Accessibility, Best Practices, and SEO scores.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Run Lighthouse performance audits on deployed websites. Checks Performance, Accessibility, Best Practices, and SEO scores.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
MCP-first testing workflow for Xcode apps (iOS, iPadOS, macOS). Use when the user asks to build, test, run, or verify an Xcode project — including UI checks, smoke tests, regression tests, or simulator launches. Prefers Xcode MCP tools via mcpbridge; falls back to xcodebuild/simctl CLI when MCP is unavailable.
Look up Apple Developer Documentation (Swift, SwiftUI, HealthKit, UIKit, etc.) and WWDC session transcripts using the sosumi CLI tool. Use when working with Swift/iOS code and need to check API signatures, find documentation, or understand Apple frameworks.
Automate browser interactions using agent-browser CLI. Use for taking screenshots, testing deployed sites, checking mobile views, form testing, or browser automation tasks.
Generate user-friendly changelogs from git commits. Transforms technical commits into clear release notes.
Request and perform code reviews. Guidelines for reviewing code quality, finding bugs, and ensuring best practices.
Database management with Prisma ORM. Use for migrations, schema management, seeding, and database queries.
| name | lighthouse-audit |
| description | Run Lighthouse performance audits on deployed websites. Checks Performance, Accessibility, Best Practices, and SEO scores. |
| allowed-tools | Bash, Read, WebFetch |
| user-invocable | true |
Run Lighthouse performance audits on deployed websites. Checks Performance, Accessibility, Best Practices, and SEO scores.
# Lighthouse CLI (optional, for local audits)
npm install -g lighthouse
# agent-browser for visual testing
npm install -g agent-browser
agent-browser install
# Run Lighthouse audit
npx lighthouse https://example.com --output=json --output-path=/tmp/report.json
# Extract scores
cat /tmp/report.json | jq '{
performance: (.categories.performance.score * 100 | round),
accessibility: (.categories.accessibility.score * 100 | round),
bestPractices: (.categories["best-practices"].score * 100 | round),
seo: (.categories.seo.score * 100 | round)
}'
# Full audit with all categories
npx lighthouse https://example.com \
--output=json \
--output-path=/tmp/lighthouse.json \
--chrome-flags="--headless" \
--only-categories=performance,accessibility,best-practices,seo
# Extract scores and metrics
cat /tmp/lighthouse.json | jq '{
scores: {
performance: (.categories.performance.score * 100 | round),
accessibility: (.categories.accessibility.score * 100 | round),
bestPractices: (.categories["best-practices"].score * 100 | round),
seo: (.categories.seo.score * 100 | round)
},
metrics: {
FCP: .audits["first-contentful-paint"].displayValue,
LCP: .audits["largest-contentful-paint"].displayValue,
TBT: .audits["total-blocking-time"].displayValue,
CLS: .audits["cumulative-layout-shift"].displayValue,
SpeedIndex: .audits["speed-index"].displayValue
}
}'
# Open PageSpeed Insights
agent-browser open "https://pagespeed.web.dev/analysis?url=https://example.com" --session lighthouse
# Wait for analysis to complete
sleep 20
# Take screenshot of results
agent-browser screenshot /tmp/lighthouse-results.png --session lighthouse
agent-browser close --session lighthouse
| Score | Status | Meaning |
|---|---|---|
| 90-100 | Green | Good |
| 50-89 | Orange | Needs Improvement |
| 0-49 | Red | Poor |
| Metric | Good | Needs Improvement | Poor |
|---|---|---|---|
| FCP | < 1.8s | 1.8s - 3s | > 3s |
| LCP | < 2.5s | 2.5s - 4s | > 4s |
| TBT | < 200ms | 200ms - 600ms | > 600ms |
| CLS | < 0.1 | 0.1 - 0.25 | > 0.25 |
npx lighthouse https://mysite.com --output=json --quiet | jq '.categories.performance.score * 100'
# Mobile (default)
npx lighthouse https://mysite.com --output=json --output-path=/tmp/mobile.json
# Desktop
npx lighthouse https://mysite.com --output=json --output-path=/tmp/desktop.json --preset=desktop
# Compare
echo "Mobile: $(cat /tmp/mobile.json | jq '.categories.performance.score * 100')%"
echo "Desktop: $(cat /tmp/desktop.json | jq '.categories.performance.score * 100')%"
# Get failed audits
cat /tmp/lighthouse.json | jq '[.audits | to_entries[] | select(.value.score != null and .value.score < 0.9) | {id: .key, score: .value.score, title: .value.title}] | sort_by(.score) | .[0:10]'
cat /tmp/lighthouse.json | jq '.audits["unused-javascript"].details.items[:5]'
cat /tmp/lighthouse.json | jq '.audits["largest-contentful-paint-element"].details'
# Generate HTML report
npx lighthouse https://example.com --output=html --output-path=./report.html
# Generate both JSON and HTML
npx lighthouse https://example.com --output=json --output=html --output-path=./report
# Specific categories only
npx lighthouse https://example.com --only-categories=performance,seo
# Quiet mode (less output)
npx lighthouse https://example.com --quiet
#!/bin/bash
SCORE=$(npx lighthouse https://mysite.com --output=json --quiet | jq '.categories.performance.score * 100')
if (( $(echo "$SCORE < 90" | bc -l) )); then
echo "Performance score $SCORE is below 90"
exit 1
fi
echo "Performance score: $SCORE"
# Before changes
npx lighthouse https://mysite.com --output=json --output-path=/tmp/before.json
# After changes
npx lighthouse https://mysite.com --output=json --output-path=/tmp/after.json
# Compare
echo "Before: $(cat /tmp/before.json | jq '.categories.performance.score * 100')%"
echo "After: $(cat /tmp/after.json | jq '.categories.performance.score * 100')%"
--preset=desktop for desktop scores