web-performance
Skill1 starsChanged 2 months agoMITView on GitHub
Static performance patterns for Astro sites — responsive images, CSS containment, minimal client JS, font loading, and Core Web Vitals targets. Use when writing or reviewing code to prevent performance issues (image sizing, lazy loading, bundle splitting). For live profiling and measurement with Chrome DevTools, use web-perf instead.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- SkillMedev/full-stack-web-devtheir own version, first seen Oct 5, 2026
- Shobhit-Halse/skillstheir own version, first seen Oct 1, 2026
- danielteles/awesome-agent-skillstheir own version, first seen Sep 2, 2026
- nimadorostkar/Claude-Skills-collectiontheir own version, first seen Jul 14, 2026
- Lukasbrujula/claude-code-frameworktheir own version, first seen Jul 6, 2026
- TheDecipherist/claude-code-mastery-project-starter-kittheir own version, first seen Jun 26, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- TheDecipherist/claude-code-mastery-project-starter-kit★ 338same name
- MRCalderon3D/everything-game-dev-code★ 90same name
- ziniman/ai-instruct★ 29same name
- nimadorostkar/Claude-Skills-collection★ 28same name
- joabgonzalez/ai-agents-skills★ 9same name
- roanbrasil/engineer-grade-agent-skills★ 8same name
- Lukasbrujula/claude-code-framework★ 4same name
- danielteles/awesome-agent-skills★ 3same name
- SkillMedev/full-stack-web-dev★ 1same name
- mirogate/web-performance-skill-cascade★ 0same name
1 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 repository81 other files it gives its agents.
- accessibility-action-planSkill
- accessibility-auditSkill
- accessibility-finding-explainerSkill
- accessibility-report-summarySkill
- agent-config-authoringSkill
- agents-sdkSkill
- ai-ux-patternsSkill
- alt-text-generatorSkill
- anti-ai-copySkill
- aria-usage-reviewSkill
- astro-architectureSkill
- astro-client-scriptsSkill
- astro-component-a11y-reviewSkill
- before-after-accessibility-commsSkill
- bfsg-risk-language-softenerSkill
- biomeSkill
- blog-from-transcriptSkill
- brand-voice-dnaSkill
- case-study-from-auditSkill
- client-email-after-auditSkill
- cloudflare-email-serviceSkill
- cloudflare-one-migrationsSkill
- cloudflare-oneSkill
- cloudflareSkill
- complexity-judgmentSkill
- component-doc-writerSkill
- content-clarity-a11y-checkSkill
- content-qaSkill
- conversation-retrospectiveSkill
- darkmodeSkill
- deep-researchSkill
- design-directionsSkill
- design-systemsSkill
- durable-objectsSkill
- faq-from-issuesSkill
- form-accessibility-reviewSkill
- frontend-designSkill
- handoffSkill
- i18nSkill
- image-to-webpSkill
- keyboard-navigation-reviewSkill
- knowledge-baseSkill
- landing-and-site-builderSkill
- landingpage-from-briefingSkill
- lighthouse-axe-result-explainerSkill
- linkedin-post-from-contentSkill
- llm-councilSkill
- local-business-seoSkill
- mcp-builderSkill
- mdx-contentSkill
- motion-designSkill
- native-html-uiSkill
- newsletter-from-auditSkill
- overlay-tool-risk-explainerSkill
- playwrightSkill
- post-auditSkill
- remotionSkill
- sandbox-migrate-to-nextSkill
- sandbox-nextSkill
- sandbox-sdkSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 2 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Only hero / above-the-fold images use loading="eager".
- Distinctive: line 24
Prefer WebP (or AVIF for larger hero images).
- Very specific: line 49
Avoid filter: blur() on moving elements.
- Very specific: line 50
Use transform: translate3d() for GPU compositing.
- Very specific: line 51
Keep will-change to the minimum of elements that actually need it.
- Very specific: line 52
Prefer CSS animation-timeline: view() over JS scroll handlers.
- Very specific: line 60
Use <script> only when truly needed.
- Very specific: line 61
Prefer CSS-only solutions: :has(), <details>, popover, <dialog>.
- Very specific: line 89
Run @casoon/astro-post-audit after the build to validate assets, duplicates, and structure.
- Very specific: line 110
All images have explicit width/height.
- Distinctive: line 111
No JS framework shipped for a component that could be pure HTML/CSS.
“Common” is measured: kept by at least 6 in 10 of the 9 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
Images
Responsive variants
Generate multiple widths (e.g. 378 w, 756 w, 1200 w) in WebP. Source images at 1024×1024 for blog teasers, 1200×630 for OG images.
Lazy loading
<img src="image.webp" loading="lazy" decoding="async" width="756" height="504" alt="…" />Only hero / above-the-fold images use loading="eager". Always set width and height to prevent CLS.
Format
Prefer WebP (or AVIF for larger hero images). Let Astro's image service handle format negotiation where possible.
CSS performance
content-visibility for long pages
.article-card {
content-visibility: auto;
contain-intrinsic-size: 0 300px;
}Browsers skip rendering of off-screen cards; contain-intrinsic-size prevents layout shift.
CSS containment
.card { contain: layout paint style; }Isolates layout and paint calculations to the element.
Animation cost
- Avoid
filter: blur()on moving elements. - Use
transform: translate3d()for GPU compositing. - Keep
will-changeto the minimum of elements that actually need it. - Prefer CSS
animation-timeline: view()over JS scroll handlers.
JavaScript
Minimize client JS
Astro renders zero JS by default — keep it that way.
- Use
<script>only when truly needed. - Prefer CSS-only solutions:
:has(),<details>, popover,<dialog>. - Hydrate islands with
client:visibleorclient:idleinstead ofclient:load.
Scroll handlers
// Bad — runs every scroll frame
window.addEventListener('scroll', handler);
// Better — passive
window.addEventListener('scroll', handler, { passive: true });
// Best — CSS scroll-driven animation, no JS
/* .element { animation-timeline: view(); } */Font loading
@import '@fontsource/inter/latin-400.css';- Self-host via
@fontsource— no external requests, optimal caching. font-display: swapis already set by@fontsource.- Subset to the scripts you actually need (
latin,latin-ext, etc.).
Build optimization
- Run
@casoon/astro-post-auditafter the build to validate assets, duplicates, and structure. - Review Vite's bundle output for large chunks: unintended npm packages in client bundles, duplicate component instances, inline SVGs that should be external.
Core Web Vitals
| Metric | Target | Common fix |
| LCP | < 2.5 s | Preload hero image, inline critical CSS |
| CLS | < 0.1 | Explicit width/height on images, contain-intrinsic-size for off-screen cards |
| INP | < 200 ms | Move work off main thread, reduce JS, prefer CSS interactions |
Edge / Cloudflare
- Static assets: automatic edge caching.
- Workers: minimize cold starts — avoid heavy npm deps in Worker entry.
- Images: use cache-control headers consistent with build fingerprints.
- Sharp is not available on Workers — use Astro's
noopimage service there.
Review checklist
- Above-the-fold image preloaded; below-the-fold lazy.
- All images have explicit
width/height. - No JS framework shipped for a component that could be pure HTML/CSS.
- Islands hydrated with the lightest directive that works.
- Fonts self-hosted, subset,
font-display: swap. - Core Web Vitals measured on a realistic field run, not just lab.
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.

