performance
Skill9 starsChanged 2 months agoMITView on GitHub
Optimize frontend Core Web Vitals (LCP, INP, CLS) and loading/rendering/network. Use when the UI feels slow, images/fonts/bundles need work, or during design audits that touch performance — phrases like "lemot", "optimize", "LCP", or "Core Web Vitals" without requiring a slash command.
78 other projects use a version of this.
Adopted by
Most recently taken up by
- Stijnus/dsh-rev-engtheir own version, first seen Nov 8, 2026
- Mahesh-Bishnoi/skillstheir own version, first seen Nov 8, 2026
- AnyOrgName/php-skillstheir own version, first seen Nov 8, 2026
- daveebbelaar/bawatheir own version, first seen Nov 8, 2026
- cognitedata/builder-skillstheir own version, first seen Nov 4, 2026
- theexperiencecompany/gaiatheir own version, first seen Nov 3, 2026
Used with
Projects with it also use app-brief, design-from-app and 10 more.
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.
StijnusSkillapp-brief
One-page brief (docs/BRIEF.md) for a new macOS app, written before any code. Use when the user has an app idea, wants to replace an app they pay for, or the research and clone skills are done.
Also in 3 projects that use this
StijnusSkilldesign-from-app
Rebuild the look of an app the user likes as a native SwiftUI design kit, by measuring its screenshots (sizes, spacing, type, colors, icons), building its parts, and comparing pixel by pixel until they match. Use when the user names an app whose look they want, shares screenshots of one, or says "make it look like X".
Also in 3 projects that use this
FlorianBruniauxSkilltdd-rust
Also in 3 projects that use this
RodrigoTomeESSkillweb-quality-audit
Comprehensive web quality audit covering performance, accessibility, SEO, and best practices. Use when asked to "audit my site", "review web quality", "run lighthouse audit", "check page quality", or "optimize my website".
Also in 9 projects that use this
launchapp-devSkilllayout-grid
Define responsive layout grid systems with columns, gutters, margins, and breakpoint behavior.
Also in 3 projects that use this
MohamedAbdallah-14Skillapp-icon
Generate an app icon from a single 1024² master and fan out to iOS (AppIcon.appiconset with squircle-ready 1024 opaque), Android (adaptive foreground + background + Android 13 monochrome), PWA (192/512 + 512 maskable with 80% safe zone), and visionOS (3-layer parallax).
Also in 3 projects that use this
- +1 more from Stijnus
Other versions78 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 78
- rtk-ai/rtk★ 86ksame name
- millionco/react-doctor★ 15ksame name
- midudev/preguntas-entrevista-react★ 7.8ksame name
- BuilderIO/agent-native★ 7.6ksame name
- ethereum/ethereum-org-website★ 6ksame name
- plugin87/ux-ui-agent-skills★ 3.1ksame name
- static-web-server/static-web-server★ 2.4ksame name
- daveebbelaar/bama★ 1.7ksame name
- lichtblick-suite/lichtblick★ 1.2ksame name
- theexperiencecompany/gaia★ 325same name
68 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 repository36 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/design-system-enforcer.mdcCursor rule
- frontend-expertSkill
- accessibilitySkill
- anti-slop-codeSkill
- anti-slop-designSkill
- app-shellSkill
- architectureSkill
- componentsSkill
- content-designSkill
- data-fetchingSkill
- design-colorSkill
- design-directionSkill
- design-foundationsSkill
- design-surfacesSkill
- design-typographySkill
- design-vocabularySkill
- devtoolsSkill
- engineering-vocabularySkill
- fidelitySkill
- formsSkill
- frontend-expertSkill
- marketingSkill
- monitoringSkill
- motion-inspectionSkill
- motionSkill
- polishSkill
- prototypeSkill
- quality-loopSkill
- responsiveSkill
- seoSkill
- skill-authoringSkill
- testingSkill
- tokensSkill
- webglSkill
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 52 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 100
Avoid unnecessary re-renders (memoize when profiling shows waste)
- Distinctive: line 103
Avoid layout thrashing (batch DOM reads before writes)
- Very specific: line 104
Use content-visibility: auto for off-screen sections
“Common” is measured: kept by at least 6 in 10 of the 52 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
Overview
Measure-first performance for user-facing UI. Hit Core Web Vitals targets; prefer compositor-friendly work and sensible loading.
When to Use
- Performance regressions or budgets
- Deep
/designaudits - Image/font/bundle optimization work
- User reports "slow", "lemot", "loading lama"
Targets
| Metric | Target | Measures |
| LCP | ≤ 2.5s | Largest visible content element render time |
| INP | ≤ 200ms | Interaction to visual response time |
| CLS | ≤ 0.1 | Unexpected layout shift score |
Decision trees
Image format decision
Is it a photo or complex image?
YES → Is AVIF supported by your target browsers?
YES → AVIF (smallest, best quality)
NO → WebP (wide support, good compression)
NO → Is it an icon or simple graphic?
YES → SVG (scalable, tiny) or Reicon
NO → Is transparency needed?
YES → WebP or PNG (WebP preferred)
NO → WebP or JPEG (WebP preferred)Font loading strategy
Is the font critical for LCP text?
YES → Preload + font-display: swap
<link rel="preload" as="font" href="/font.woff2" type="font/woff2" crossorigin>
NO → Is it a secondary/accent font?
YES → font-display: swap (load async)
NO → Is it used only on specific pages?
YES → Lazy load via JS / @font-face on that page only
NO → font-display: optional (may skip if slow)LCP resource priority
What is the LCP element?
IMAGE → fetchpriority="high" + preload + NO lazy-load + width/height set
TEXT → Preload the font + inline critical CSS for that heading
VIDEO → Preload poster image + fetchpriority="high" on poster
Is there a render-blocking script above LCP?
YES → Move to bottom / add defer / async
NO → GoodWorkflow
1. Loading
- Preconnect critical origins
- Preload LCP resources (
<link rel="preload">) fetchpriority="high"on LCP image — never lazy-load it- Self-host fonts with
font-display: swapandwoff2format - Modern image formats (WebP/AVIF) with
<picture>fallback - Code-split routes and heavy features (
lazy()+Suspense)
Recipe — optimal LCP image:
<!-- Preload in <head> -->
<link rel="preload" as="image" href="/hero.webp" type="image/webp">
<!-- In body — no lazy, explicit dimensions -->
<img
src="/hero.webp"
alt="Hero description"
width="1200" height="600"
fetchpriority="high"
>2. Rendering
- Avoid unnecessary re-renders (memoize when profiling shows waste)
- Virtualize long lists (>100 items) —
@tanstack/react-virtualor equivalent - Animate only
transform/opacity/filterfor compositor-friendly motion - Avoid layout thrashing (batch DOM reads before writes)
- Use
content-visibility: autofor off-screen sections
Recipe — avoid layout thrashing:
// BAD: interleaved read-write
elements.forEach(el => {
const h = el.offsetHeight; // read → forces layout
el.style.height = `${h}px`; // write → invalidates layout
});
// GOOD: batch reads, then writes
const heights = elements.map(el => el.offsetHeight); // all reads
elements.forEach((el, i) => {
el.style.height = `${heights[i]}px`; // all writes
});3. CLS prevention
| Cause | Fix |
| Images without dimensions | Always set width + height or aspect-ratio |
| Dynamic content above fold | Reserve space with min-height or skeleton |
| Web fonts FOUT | font-display: optional for non-critical fonts |
| Late-loading ads/embeds | Fixed-size container placeholder |
| Injected banners/bars | Reserve space or use transform animation |
4. INP optimization
| Symptom | Fix |
| Click feels slow (>200ms) | Break long tasks — scheduler.yield() or requestIdleCallback |
| Typing lag in inputs | Debounce heavy handlers (300ms); keep onChange lightweight |
| Scroll jank | Use passive event listeners; avoid heavy scroll handlers |
| Heavy computation on interaction | Move to Web Worker or defer with requestIdleCallback |
Recipe — break long task:
async function processItems(items) {
for (const item of items) {
processItem(item);
// Yield to let browser handle pending interactions
if (navigator.scheduling?.isInputPending?.()) {
await scheduler.yield();
}
}
}5. Network
- Cache hashed static assets (
max-age=31536000, immutable) - HTML:
no-cache(always revalidate) - API: appropriate cache or
no-storefor private data - Compression: brotli preferred > gzip
- Paginate API responses; field selection when available
Performance budget
| Resource | Budget |
| Total JavaScript | < 200KB gzipped |
| Total CSS | < 50KB gzipped |
| Total Images (above fold) | < 500KB |
| Total Fonts | < 100KB |
| First Contentful Paint | < 1.8s |
| Largest Contentful Paint | < 2.5s |
| Total Blocking Time | < 200ms |
| Cumulative Layout Shift | < 0.1 |
Quick audit method
- Lighthouse — run in Incognito, mobile throttling → check LCP, INP, CLS scores
- Performance panel — record interaction, look for long tasks (>50ms red blocks)
- Network panel — check waterfall: is LCP resource the first to load?
- Coverage tab — how much CSS/JS is unused on this page?
- web-vitals library — add to app for real-user monitoring
Checklist
- CWV targets known for the change
- LCP resource identified + prioritized (
fetchpriority="high", preload) - LCP image NOT lazy-loaded
- Image format decision tree followed (WebP/AVIF)
- Font loading strategy chosen (preload critical, swap/optional others)
- No obvious CLS (reserved sizes for media, skeletons for dynamic content)
- Heavy features code-split
- INP: no long tasks blocking interactions
- Motion uses compositor-friendly properties (
transform/opacity) - Performance budget within limits
Depth
Full guide: references/performance.md.
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.

