Lighthouse CLI expert for web performance auditing. Use when users need to audit performance, accessibility, SEO, best practices, or generate audit reports.
/plugin marketplace add leobrival/topographic-plugins-official/plugin install dev@topographic-plugins-officialThis skill inherits all available tools. When active, it can use any tool Claude has access to.
reference/commands-reference.mdreference/common-patterns.mdreference/troubleshooting.mdLighthouse 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:
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.