perf-ci-gates

Configures Lighthouse CI and Biome quality gates in GitHub Actions for Astro sites.

Updated Jun 17, 2026
One-click install
npx skills add https://github.com/ccediland/web-stack-skills --skill perf-ci-gates-ccediland
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: perf-ci-gates
Source: https://github.com/ccediland/web-stack-skills/tree/main/plugin/skills/perf-ci-gates
Command: npx skills add https://github.com/ccediland/web-stack-skills --skill perf-ci-gates-ccediland

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @biomejs/biome, prettier, prettier-plugin-astro, @lhci/cli, and includes references (resource) components.

What problem does it solve? Without automated gates, performance regressions and lint violations slip into production unnoticed. This Skill wires Lighthouse CI budgets and Biome checks into GitHub Actions so every pull request is blocked on Core Web Vitals regressions, resource-weight overruns, and code-quality failures before merge. ## Core Features & Use Cases - Lighthouse CI performance gate: Collects audits from dist/client via staticDistDir (or astro preview for SSR routes), asserts LCP, TBT as the INP proxy, CLS, category floors, and resource-size budgets with numberOfRuns: 5 for stability. - Biome code-quality gate: Runs biome ci as the single lint and format check for JS, TS, CSS, and JSON, with prettier-plugin-astro handling .astro templates while Biome's HTML support remains experimental. - Use Case: You are shipping an Astro 7 site on Cloudflare Workers and want PRs to fail automatically when a change pushes JavaScript over 150 KB or drops the Lighthouse performance score below 0.9 — this Skill produces the lighthouserc.json, biome.json, and ci.yml to do exactly that. ## Quick Start Set up Lighthouse CI and Biome quality gates in GitHub Actions for my Astro site on Cloudflare Workers.

Frequently Asked Questions about perf-ci-gates

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

FAQPage Schema
How do I gate pull requests on Lighthouse scores in GitHub Actions?▼

Use treosh/lighthouse-ci-action@v12 with a lighthouserc.json that asserts category floors and metric ceilings, then mark the lighthouse job as a required status check in branch protection. Set numberOfRuns to 5 so assertions run against a stable median.

How do I set up Biome for an Astro project?▼

Keep Biome's experimental HTML flag off, disable its formatter for .astro files, and let prettier-plugin-astro format templates while Biome lints and formats JS, TS, CSS, and JSON. Run biome ci --reporter=github in CI for inline annotations.

Can Lighthouse CI measure INP in the lab?▼

No, INP requires real user interaction and is field-only. Gate Total Blocking Time as the lab proxy for INP, since reducing TBT generally reduces INP, and monitor real INP through field monitoring such as Cloudflare Web Analytics.

Why does Lighthouse CI find no files when auditing my Astro Cloudflare build?▼

The Cloudflare adapter defaults to output: 'server', so static assets land in dist/client, not dist. Point staticDistDir at ./dist/client; pointing it at ./dist collects nothing.

Why does LHCI fail with 'Could not find hash' in GitHub Actions?▼

Shallow clones break LHCI's git-ancestor detection. Set fetch-depth to 20 or higher on actions/checkout and check out the PR head SHA so LHCI can resolve commit history.

Can I use budgetsFile together with assertions in lighthouserc.json?▼

No. LHCI 0.15 throws 'Cannot use both budgets AND assertions', and the treosh action can swallow that crash so the job goes green asserting nothing. Express resource budgets as resource-summary assertions inside the assertions block instead.