Agent skill
lighthouse-audit
Run Lighthouse performance audits against locally served pages and summarize key metrics. Use when the user asks to check Lighthouse scores, Core Web Vitals, or performance regressions for new or specified routes (local dev/preview), or to complement DevTools MCP performance traces.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/lighthouse-audit
SKILL.md
Lighthouse Audit
Overview
Audit one or more local routes with Lighthouse, then summarize key metrics and optional DevTools MCP performance traces.
Inputs to confirm
- baseUrl: default
http://localhost:3000 - routes: list of paths (e.g.
/pricing) or full URLs - preset:
mobile(default) ordesktop - runs: optional repeat count for more stable scores
- mode: dev (
pnpm dev) or prod (pnpm build && pnpm start)
If the user says "new page", ask for the route if it is not already known.
Workflow
- Ensure the local server is running
- Prefer production-like results:
pnpm build && pnpm start - Quick iteration:
pnpm dev
- Prefer production-like results:
- Run Lighthouse CLI via the bundled script
- Single route:
python3 .claude/skills/lighthouse-audit/scripts/run_lighthouse.py --route "/pricing" - Multiple routes:
python3 .claude/skills/lighthouse-audit/scripts/run_lighthouse.py --routes "/,/pricing,/blog" --preset desktop --runs 3 - Full URL:
python3 .claude/skills/lighthouse-audit/scripts/run_lighthouse.py --url "http://localhost:3000/pricing" - Reports are written under
/.lighthouse/<slug>/<preset>/<timestamp>/report.json
- Single route:
- Optional: capture a DevTools MCP performance trace for deeper analysis
mcp__chrome-devtools__new_pageto open the URLmcp__chrome-devtools__performance_start_tracewithreload: true, thenmcp__chrome-devtools__performance_stop_trace- Use trace insights to explain bottlenecks that align with Lighthouse findings
- Report results
- Provide performance score and key metrics (FCP, LCP, CLS, TBT, Speed Index, TTI/INP)
- Call out regressions vs previous runs when available
- Suggest fixes tied to the worst metrics
Resources
scripts/run_lighthouse.py: runs Lighthouse locally and prints a metric summary
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?