agentleFS
CaduS0uzaCaduS0uza/qa-supreme/skills/perf-budget/SKILL.md

perf-budget

Skill1 starsChanged 2 months agoMITView on GitHub

Set and enforce performance budgets on real user metrics — LCP, INP, CLS, TTFB, bundle size — and detect regressions in CI. Use when asked about performance, slow pages, Core Web Vitals, Lighthouse scores, or bundle size.

6 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use doc-sync.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • JetBrainsSkill

    doc-sync

    Keeps IdeaVim documentation in sync with code changes. Use this skill when you need to verify documentation accuracy after code changes, or when checking if documentation (in doc/, README.md, CONTRIBUTING.md) matches the current codebase. The skill can work bidirectionally - from docs to code verification, or from code changes to documentation updates.

    Also in 3 projects that use this

The file

Files
SKILL.md

Performance Budgets

A performance test without a budget is a number nobody acts on. Budgets turn performance into a pass/fail gate like any other test.

Default budgets (tighten per product, never loosen silently)

MetricGoodBudgetWhy it matters
LCP< 2.5s2.5swhen the page feels loaded
INP< 200ms200msresponsiveness to real interaction
CLS< 0.10.1layout jumping under the user's finger
TTFB< 800ms800msserver + network before anything renders
JS transferred—300KB gzthe single biggest lever on low-end devices
Requests on load—50latency compounding

Measure

node runner/bin/qa-supreme.mjs perf --url https://app.example.com    # every crawled state, against budgets
npx lighthouse https://app.example.com --preset=desktop --output=json --output-path=lh.json
npx unlighthouse --site https://app.example.com                      # whole-site sweep

Lab numbers are a signal, not the truth. Throttle to a mid-tier device (4x CPU slowdown, Fast 3G) — measuring on your laptop over fiber measures your laptop. Where you have field data (CrUX/RUM), the p75 field number wins any argument with a lab number.

Enforce in CI

Fail the build on regression, not on absolute beauty: compare against the base branch and block when LCP degrades by more than 10% or the JS bundle grows past its budget. size-limit, bundlesize, or Lighthouse CI assertions all do this; the tool matters less than the block.

Load and stress

Front-end budgets say nothing about the backend under load. See load-and-stress for k6 thresholds. Both are required for a launch: a page that renders in 1s when nobody is using it is not a performance result.

Diagnosing a breach

  • LCP high -> what is the LCP element? Image without priority, font blocking, server slow, or a client-side render waiting on a waterfall.
  • CLS high -> images without dimensions, injected banners, late-loading fonts.
  • INP high -> long tasks on the main thread; profile and break them up.
  • TTFB high -> backend or cold start; front-end optimization will not save it.

Report the metric, the budget, the delta and the specific cause. A perf report without a named cause is a chart.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.