web-performance
Skill3 starsChanged 10 days agoMITView on GitHub
Use this skill when a page or app feels slow, a bundle grew, Core Web Vitals regressed, or a build/deploy needs a performance budget - LCP, INP, CLS, TTFB, hydration cost, image and font strategy, cache headers, and render-blocking work. Covers measuring before changing, the fixes ordered by payoff, and proving the win with numbers.
16 other projects use a version of this.
Adopted by
Most recently taken up by
- Mehul72/skillstheir own version, first seen Nov 8, 2026
- reddygopalkrishna/developer-agent-skillstheir own version, first seen Nov 8, 2026
- ziniman/ai-instructtheir own version, first seen Nov 1, 2026
- nimadorostkar/Claude-Skills-collectiontheir own version, first seen Oct 13, 2026
- MRCalderon3D/everything-game-dev-codetheir own version, first seen Oct 13, 2026
- shreyam1008/shre-skillstheir own version, first seen Oct 9, 2026
Other versions16 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 16
- TheDecipherist/claude-code-mastery-project-starter-kit★ 337same name
- MRCalderon3D/everything-game-dev-code★ 105same name
- nimadorostkar/Claude-Skills-collection★ 33same name
- ziniman/ai-instruct★ 29same name
- reddygopalkrishna/developer-agent-skills★ 8same name
- Lukasbrujula/claude-code-framework★ 4same name
- casoon/ai-agent-config★ 1same name
- Mehul72/skills★ 1same name
- minagayid/Agents★ 1same name
- SkillMedev/full-stack-web-dev★ 1same name
6 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository72 other files it gives its agents.
- workflow/AGENTS.mdAGENTS.md
- docs/llms.txtllms.txt
- llms.txtllms.txt
- ai-video-prompt-engineerSkill
- api-contract-designSkill
- api-hardeningSkill
- brainstormingSkill
- cavecrewSkill
- caveman-commitSkill
- caveman-compressSkill
- caveman-helpSkill
- caveman-reviewSkill
- cavemanSkill
- councilSkill
- database-migrationsSkill
- deep-researchSkill
- dependency-auditSkill
- deployment-patternsSkill
- e2e-testingSkill
- error-handlingSkill
- exa-searchSkill
- finishing-a-development-branchSkill
- frontend-securitySkill
- github-opsSkill
- graphifySkill
- graphyloop-wavesSkill
- graphyloop-workflowSkill
- gsap-coreSkill
- gsap-frameworksSkill
- gsap-performanceSkill
- gsap-pluginsSkill
- gsap-reactSkill
- gsap-scrolltriggerSkill
- gsap-timelineSkill
- gsap-utilsSkill
- high-end-visual-designSkill
- image-to-codeSkill
- last30daysSkill
- minimalist-uiSkill
- postgres-patternsSkill
- prisma-patternsSkill
- receiving-code-reviewSkill
- redesign-existing-projectsSkill
- remotion-video-creationSkill
- requesting-code-reviewSkill
- search-firstSkill
- secrets-hygieneSkill
- security-reviewSkill
- security-scanSkill
- short-video-productionSkill
- story-engineeringSkill
- supabase-setupSkill
- swarm-memorySkill
- systematic-debuggingSkill
- tdd-workflowSkill
- terminal-opsSkill
- threejs-animationSkill
- threejs-fundamentalsSkill
- threejs-geometrySkill
- threejs-interactionSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 15 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Before shipping a new page, dashboard, or heavy dependency.
- Distinctive: line 17
After adding an animation library, chart library, map, video, or analytics tag.
- Very specific: line 88
Add RUM (web-vitals → your analytics endpoint) if the app has real users — lab numbers do not catch a slow third-party tag on a cold cache.
“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Web performance (front of the stack)
Frontend performance work goes wrong in one way: guessing. Someone memoizes a component while a 900 KB font and a synchronous third-party script own the critical path. Measure, fix the biggest item, measure again — and keep the number.
When to activate
- "It's slow", "LCP regressed", "the bundle doubled", "the list janks", low Lighthouse/PageSpeed score, a CI budget failing.
- Before shipping a new page, dashboard, or heavy dependency.
- After adding an animation library, chart library, map, video, or analytics tag.
Step 1 — baseline (never skip)
Record numbers before touching code; without a baseline there is no win to claim.
npx lighthouse http://127.0.0.1:PORT --preset=desktop --quiet --output=json --output-path=./.perf/base.json
npx lighthouse http://127.0.0.1:PORT --quiet # default = mobile throttling, the honest one
ANALYZE=true npm run build # next: @next/bundle-analyzer
npx vite-bundle-visualizer # vite
npx source-map-explorer 'dist/assets/*.js'Capture: LCP, INP (replaces FID), CLS, TTFB, total JS transferred, largest chunks, request count, and the field data if you have RUM. Note whether the run is throttled — an unthrottled localhost number is not a result.
Targets (75th percentile, mobile) — the three Core Web Vitals plus TTFB, which is a diagnostic for the first of them rather than a vital itself: LCP ≤ 2.5 s · INP ≤ 200 ms · CLS ≤ 0.1 · TTFB ≤ 0.8 s, and a JS budget you write down (e.g. ≤ 170 KB gzipped for the initial route).
Step 2 — fixes, ordered by payoff
LCP (usually an image or a slow server)
- Find the LCP element in the Lighthouse trace before optimizing anything.
- Hero image: correct format (AVIF/WebP), correct dimensions,
priority/fetchpriority="high",preloadthe actual file; every other imageloading="lazy"decoding="async".
- Kill render-blocking: no
@importchains, inline critical CSS,deferscripts,preconnectto the font/API origin, self-host fonts withfont-display: swapand subset them (unicode-range). One variable font beats four weights. - Server side: cache the data the first paint needs, stream (RSC/Suspense) instead of awaiting everything, and check TTFB separately — a 1.5 s TTFB is a backend bug (query plan, N+1, cold start), not a CSS problem.
INP / main-thread
- Split the bundle: dynamic
import()for routes and anything below the fold (editors, charts, maps, date pickers, emoji sets). Never import a whole icon or lodash package for one symbol. - Client JS is a budget: keep components server-rendered where the framework allows
it; a
"use client"at the top of a layout ships the entire tree. - Break up long tasks (> 50 ms):
scheduler.yield()/setTimeoutchunks,startTransitionfor non-urgent updates, debounce input handlers, move parsing or crypto to a Web Worker. - Lists: virtualize past a few hundred rows, stable
keys, avoid new object/array literals in props on every render. Memoize only where a profile shows the cost. - Animate
transform/opacityonly; anything touching layout thrashes. Read then write — nevergetBoundingClientRectinside a write loop.
CLS
- Explicit
width/heightoraspect-ratioon every image, video, iframe, ad slot. - Reserve space for banners, skeletons, and async content; never insert above existing content after paint.
- Fonts: matched fallback metrics (
size-adjust,ascent-override) ornext/fontto remove the swap shift.
Transfer and caching
- Immutable hashed assets:
cache-control: public, max-age=31536000, immutable; HTMLno-cache(or a short s-maxage +stale-while-revalidate) at the CDN. - Compression on (brotli) — verify with
curl -sI -H 'accept-encoding: br'. - Drop the dependency you added for one helper; prefer the platform (
Intl,URL,structuredClone, CSS:has).
Step 3 — prove it and keep it
- Re-run the exact same command as the baseline, same throttling, and report before → after per metric. A change with no measurement is not done.
- Land a budget so the win survives:
lighthouse-ciassertions, aperformance.budget.json,size-limit, or a bundle-size check in CI. - Add RUM (
web-vitals→ your analytics endpoint) if the app has real users — lab numbers do not catch a slow third-party tag on a cold cache.
Anti-patterns
- Optimizing what the profile did not blame.
- Wrapping everything in
memo/useMemo/useCallbackas policy — cost, no win, and it hides the real regression. loading="lazy"on the hero image (delays LCP).- Preloading everything — preload competes with the critical request.
- Removing a feature to hit a number without saying so.
Reporting
A table of metric · before · after · how measured, then the file-level changes that produced it, then the budget added. Name what regressed elsewhere (e.g. bundle down but TTFB up) rather than reporting only the improved metric. If a number could not be measured, say which and why.
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
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.

