Frontend5-point gate · Next.js / React · Mobile · Any stack
Performance is a budget, not a hope
Numbers written down, measured on the production build, enforced at the gate.
Use this when
'Feels fast on my machine'
A 400 kB hero image
Analytics loading before content
The quality gate
- Budgets exist in writing: LCP < 2.5s, INP < 200ms, per-route JS budget
- Measured against the production build on a throttled profile — never dev mode
- Images: sized, lazy below the fold, modern formats; fonts load without layout shift
- Every third-party script is justified line-by-line and loads after interactive
- The gate fails when a budget is exceeded — no 'we'll optimize later'
Prove it: Lighthouse the production build on a throttled mobile profile — budgets green or the merge waits.
Install or copy
Save the download as performance-budget/SKILL.md in your agent's supported skills directory, or copy the complete package below. Load it only when its description matches the work.
Portable SKILL.md
--- name: performance-budget description: "Applies “Performance is a budget, not a hope” as a repeatable product-quality gate. Use during frontend work when numbers written down, measured on the production build, enforced at the gate." --- # Performance is a budget, not a hope Apply this skill during **Frontend** work. It supports Next.js / React, Mobile, Any stack. Numbers written down, measured on the production build, enforced at the gate. ## Instructions Set performance budgets in writing before building: LCP under 2.5s, INP under 200ms, and a JavaScript budget per route. Measure only against the production build with CPU/network throttling — dev-mode numbers are fiction. Enforce image discipline: explicit dimensions, lazy loading below the fold, modern formats, preconnect to third-party hosts. Load fonts without layout shift (metric-compatible fallback or size-adjust). Justify every third-party script by name and business need; default is no. When a budget is exceeded, treat it as a failing test: the change doesn't merge until it fits or the budget is consciously re-negotiated in writing. ## Detect the problem - 'Feels fast on my machine' - A 400 kB hero image - Analytics loading before content ## Hold the gate Do not declare this phase complete until every item passes: - [ ] Budgets exist in writing: LCP < 2.5s, INP < 200ms, per-route JS budget - [ ] Measured against the production build on a throttled profile — never dev mode - [ ] Images: sized, lazy below the fold, modern formats; fonts load without layout shift - [ ] Every third-party script is justified line-by-line and loads after interactive - [ ] The gate fails when a budget is exceeded — no 'we'll optimize later' ## Verify the result Lighthouse the production build on a throttled mobile profile — budgets green or the merge waits.
More frontend skills
Hand-made over generated
Tokens, motion discipline, and the 100ms rule — the anti-slop frontend bar.
The accessibility floor
Keyboard, contrast, semantics, reduced motion — the floor nobody ships below.
Components with honest APIs
Props speak the domain; variants are unions; composition beats configuration.
Want this quality gate applied to a real product decision?
Start a First Loop