Set, measure, and enforce performance budgets for web pages an agent ships: size limits, asset counts, and timing targets, with curl-based measurement and concrete reduction tactics. Triggers on: performance budget, page weight, make my page faster, web vitals, Lighthouse, slow page, reduce bundle size.
./install.sh performance-budgetsname: "performance_budgets" description: "Set, measure, and enforce performance budgets for web pages an agent ships: size limits, asset counts, and timing targets, with curl-based measurement and concrete reduction tactics. Triggers on: performance budget, page weight, make my page faster, web vitals, Lighthouse, slow page, reduce bundle size." metadata: { "includeInPrompt": true }
Teach an agent that builds and deploys HTML pages to define a performance budget (size limits, asset counts, timing targets), measure a page against it with real tools, and apply concrete reductions to stay under it. This is about shipping fast pages — setting the limits, proving compliance, and fixing overshoot — not about search rankings (see seo_basics).
lighthouse <url> --only-categories=performance) to debug causes. When no tooling is available, this curl weight check catches the common sins (executed and verified 2026-09-20):bash
URL="https://example.com/" # replace with your page
curl -sS --compressed -D /tmp/hdrs -o /tmp/body -w \
'code=%{http_code} ttfb=%{time_starttransfer}s total=%{time_total}s bytes=%{size_download} type=%{content_type}\n' "$URL"
# inventory subresources, ranked by transferred bytes
BASE="https://example.com" # same as your page
grep -oiE '"((/[^"]*|https?://[^"]*)\.(js|css|png|jpe?g|webp|avif|svg|woff2?))"' /tmp/body \
| tr -d '"' | sort -u | while read -r p; do
case "$p" in /*) u="$BASE$p";; *) u="$p";; esac
s=$(curl -sS --compressed -o /dev/null -w '%{size_download}' "$u")
echo "$s $u"
done | sort -rn | head -15
The --compressed flag measures what a real browser receives (gzip/brotli on the wire), not the raw file size — comparing uncompressed files to your budget inflates the numbers. The inventory's line count is your request count; the ranked list is your hit list.
<picture>), resize to the display size (never ship a 2400px photo into a 600px slot), loading="lazy" on everything below the fold — never on the hero/LCP element.font-display: swap, limit families and weights; system fonts beat webfonts when the look allows it.defer non-critical scripts (parser continues, script runs after parse), async for fully independent scripts, and cut what isn't needed for first paint. Third-party embeds (analytics, chat widgets) are the usual budget-killers — load them after the load event or on user interaction instead.max-age on static assets, so repeat visits barely remeasure.perf-budget.txt in the repo) so drift is visible instead of silent.After applying this skill, an agent should produce:
--compressed (or DevTools' "transferred" column); raw file size is the wrong number.loading="lazy" above the fold is a classic self-inflicted regression; reserve fetchpriority="high" for the hero.publisher key 2e43c913833850e6d80f939677e3de76e806d47785c0f1caaca90f9d18c98e1e
No ratings yet — be the first to rate it.