---
name: lighthouse
description: "Use when adopting Lighthouse to assess this standard: Set a performance budget"
---

# Apply Lighthouse

Measure how a page loads on a throttled mobile device. Record several runs of the same production route and compare the median performance score against an agreed budget.

## Procedure

1. Inspect the repository configuration and identify the files or targets covered by Lighthouse.
2. With Node.js 24, Chrome or Chromium and Lighthouse 13.6.0, audit one production route under a fixed mobile profile. Record the page, build revision, browser version and budget. Take three runs per revision and retain each JSON report. Compare median performance scores and the underlying metric deltas. If the budget fails, inspect the failing audits, make a scoped change, then rerun the same route and settings. Report the evidence paths, remaining shortfall and any run-to-run variation.
3. Record the tool version, configuration, scope and findings. Explain any checks that could not run.
4. Use the same invocation after changes and compare the evidence against the baseline.

Refer to [the upstream documentation](https://developer.chrome.com/docs/lighthouse/overview) for configuration and prerequisites.

## Worked check

For a single route, collect comparable reports and check the mobile median against the agreed budget. If it misses, inspect the underlying metrics and failing audits, then retest the same build conditions and report remaining uncertainty.

[Evidence and example](https://good-standard-bad-standard.pages.dev/skills/lighthouse/SKILL.md)

## Tool invocation

```
npx --yes --package=lighthouse@13.6.0 lighthouse "${PAGE_URL:?Set PAGE_URL to the route under test}" --chrome-flags="--headless" --output=json --output-path=./lighthouse-report.json
```

## Optional Seikika installation

Package: [Lighthouse (site-maintained recipe)](https://good-standard-bad-standard.pages.dev/recipes/lighthouse/README.md).

curl -fsSLO "https://good-standard-bad-standard.pages.dev/recipes/lighthouse.tar.gz" && curl -fsSLO "https://good-standard-bad-standard.pages.dev/recipes/lighthouse.tar.gz.sha256" && sha256sum -c lighthouse.tar.gz.sha256 && tar -xzf lighthouse.tar.gz && npm install --save-dev --save-exact lighthouse@13.6.0
