Install the Lighthouse CI CLI (lhci) as a dev dependency and add an lhci autorun step to your CI workflow configuration file
Create a lighthouserc.js or lighthouserc.json configuration file at the project root defining the 'ci' block with 'collect' (URLs to test, number of runs) and 'assert' settings
Define performance budgets in the 'assert' block using 'assertions' keyed by audit ID; set minScore, maxNumericValue, or maxLength thresholds with severity levels of warn or error
Configure the 'upload' block to send results to a Lighthouse CI server, temporary public storage, or a local filesystem path for artifact archiving
Run lhci autorun in CI and configure the job to fail on assertion errors, blocking merges when performance budgets are violated
Known gotchas
Lighthouse scores are variable across runs even in a stable CI environment; set budgets against numeric metric values (milliseconds, bytes) rather than composite scores to reduce flakiness
By default lhci tests against a locally served build; if the tested URL is a live environment or staging server, cold server startup time will inflate TTFB and unfairly penalize server-side metrics
The temporary public Lighthouse CI storage (--upload.target=temporary-public-storage) is not private; do not use it for internal or pre-release builds as reports are publicly accessible via the printed URL
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp