perf-lighthouse

Run Lighthouse audits via CLI or Node API and enforce performance budgets in CI.

Updated Sep 15, 2026
One-click install
npx skills add https://github.com/Peterson-Benhame/agent-skills --skill perf-lighthouse-peterson-benhame
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perf-lighthouse
Source: https://github.com/Peterson-Benhame/agent-skills/tree/main/packages/skills-catalog/skills/%28performance%29/perf-lighthouse
Command: npx skills add https://github.com/Peterson-Benhame/agent-skills --skill perf-lighthouse-peterson-benhame

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires lighthouse, chrome-launcher, @lhci/cli.

What problem does it solve? Measuring website performance consistently is difficult: manual browser tests are unrepeatable, scores vary between runs, and regressions slip into production unnoticed. This Skill provides ready-to-use commands and configurations for running Lighthouse audits, parsing reports, and enforcing performance budgets in CI pipelines. ## Core Features & Use Cases - CLI and Node API Audits: Run Lighthouse from the command line with presets, form factors, and throttling options, or programmatically via the Node API with chrome-launcher. - Performance Budgets: Define resource size, count, and timing budgets in budget.json and fail builds that exceed them. - CI Integration: Set up GitHub Actions with lighthouse-ci-action or full LHCI with historical tracking, assertions, and report uploads. - Report Parsing and Comparison: Extract Core Web Vitals from JSON reports and compare baseline versus PR builds to detect regressions. - Use Case: A team wants to prevent performance regressions on every pull request. Use this Skill to configure an LHCI workflow that runs three audits per URL, asserts a minimum performance score of 0.9, and fails the build if LCP exceeds 2500ms. ## Quick Start Run a Lighthouse performance audit on my staging URL and show me the performance score and Core Web Vitals.

Frequently Asked Questions about perf-lighthouse

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a Lighthouse audit from the command line?

Install Lighthouse globally with npm install -g lighthouse, then run lighthouse followed by the target URL. Add --preset=perf for performance-only audits, --form-factor=mobile or desktop, and --output=json or html to control the report format.

How to set performance budgets in Lighthouse?

Create a budget.json file defining resourceSizes, resourceCounts, and timings with thresholds for metrics like interactive and largest-contentful-paint. Pass it to Lighthouse with the --budget-path flag to fail audits that exceed the budgets.

How do I integrate Lighthouse into GitHub Actions CI?

Use the treosh/lighthouse-ci-action in a workflow, specifying URLs to test and an optional budgetPath. For historical tracking and assertions, install @lhci/cli, configure lighthouserc.js with collect, assert, and upload settings, then run lhci autorun.

Why are my Lighthouse scores inconsistent between runs?

Score variance comes from network and CPU fluctuations during testing. Run multiple audits with numberOfRuns set to 3 or more and use the median result, and consider --throttling-method=devtools for more controlled conditions.

When should I not use this Lighthouse audit skill?

Do not use it for fixing specific performance issues; use a web optimization or Core Web Vitals skill instead. It is also not intended for Astro-specific optimization, which requires a dedicated Astro performance skill.