From dev
Lighthouse CLI expert for web performance auditing. Use when users need to audit performance, accessibility, SEO, best practices, or generate audit reports.
npx claudepluginhub leobrival/topographic-plugins-officialThis skill is limited to using the following tools:
Lighthouse is an open-source automated tool for improving web page quality. This guide provides essential workflows and quick references for auditing web performance, accessibility, SEO, and best practices.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Lighthouse is an open-source automated tool for improving web page quality. This guide provides essential workflows and quick references for auditing web performance, accessibility, SEO, and best practices.
# Check Lighthouse installation
lighthouse --version
# Run your first audit
lighthouse https://example.com
# Audit localhost
lighthouse http://localhost:3000
# Generate JSON report
lighthouse https://example.com --output=json
# View help
lighthouse --help
# Audit with both HTML and JSON reports
lighthouse https://example.com --output=html --output=json
# View performance scores
lighthouse https://example.com --output=json | jq '.categories'
# Check specific category score
lighthouse https://example.com --output=json | jq '.categories.performance.score'
# Mobile performance audit
lighthouse https://example.com --preset=mobile --output=html
# Desktop performance audit
lighthouse https://example.com --preset=desktop --output=html
# Both reports
lighthouse https://example.com --preset=mobile --output=json --output-path=./reports/mobile.json
lighthouse https://example.com --preset=desktop --output=json --output-path=./reports/desktop.json
# Audit accessibility only
lighthouse https://example.com --only-categories=accessibility
# Audit performance and SEO only
lighthouse https://example.com --only-categories=performance,seo
# All categories except PWA
lighthouse https://example.com --skip-categories=pwa
# Create reports directory
mkdir -p reports
# Audit multiple URLs
lighthouse https://example.com --output=html --output-path=./reports/example-com.html
lighthouse https://example.org --output=html --output-path=./reports/example-org.html
# Or with loop
for url in https://example.com https://example.org; do
lighthouse $url --output=json --output-path=./reports/
done
# Generate minimal output for CI
lighthouse https://example.com --output=json --quiet
# Audit with custom timeout
lighthouse https://example.com --output=json --timeout=60000
# Monitor performance over time
lighthouse https://example.com --output=json --output-path=./audits/$(date +%Y-%m-%d).json
When to use which option:
lighthouse <url> with --preset=desktop or --preset=mobile--only-categories=<category>--skip-categories=<category>--output=html or --output=json with --output-pathlighthouse http://localhost:PORT--output=json --quiet with timeout settings--verbose flag# Add authentication headers
lighthouse https://example.com --extra-headers='{"Authorization":"Bearer token123"}'
# Add custom headers
lighthouse https://example.com --extra-headers='{"X-API-Key":"your-api-key"}'
# Disable throttling (real device speed)
lighthouse https://example.com --throttling-method=provided
# Simulate network throttling
lighthouse https://example.com --throttling-method=simulate
# Custom Chrome flags
lighthouse https://example.com --chrome-flags="--headless"
# Use specific Chrome executable
lighthouse https://example.com --chrome-path=/path/to/chrome
# Run in headless mode (faster)
lighthouse https://example.com --chrome-flags="--headless"
# Run without sandbox (containers)
lighthouse https://example.com --chrome-flags="--no-sandbox"
Common Issues:
Audit fails with timeout
--timeout=60000 (milliseconds)Can't audit localhost
Authentication failing
--extra-headers with proper formatReport not generating
--output-path with full pathChrome won't launch
--chrome-path to specify Chrome locationFor detailed troubleshooting steps, see the Troubleshooting Guide.
Load as needed for detailed information:
Commands Reference - Complete CLI command documentation with all flags and options. Use when you need exact syntax or flag details for any Lighthouse command.
Common Patterns - Real-world patterns and workflows for different audit scenarios, batch processing, CI/CD integration, report analysis, and performance monitoring. Use for implementing specific audit workflows.
Troubleshooting Guide - Detailed error messages, diagnosis steps, and resolution strategies for audit failures, Chrome issues, network problems, and report generation errors. Use when encountering errors or unexpected behavior.
When to use each reference: