[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6D0BM5YE6KVCKCT5XSF4ZHE":3,"skill-same:01M6D0BM5YE6KVCKCT5XSF4ZHE":63},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":14,"repositoryHtmlUrl":45,"repositoryHomepageUrl":46,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":48,"install":49,"resources":62},"01M6D0BM5YE6KVCKCT5XSF4ZHE","performance",null,"Optimize web performance for faster loading and better user experience. Use when asked to \"speed up my site\", \"optimize performance\", \"reduce load time\", \"fix slow loading\", \"improve page speed\", or \"performance audit\".","agusruiz11\u002Fposicionarte-2026","agusruiz11","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F70041288?v=4","01M6CZWNW7CXR4K6E7CJQ8C15P","Agustin M. Ruiz","01M6CZWP1N7K2JHWWCJKVRJ46E",0,"MIT","https:\u002F\u002Fgithub.com\u002Fagusruiz11\u002Fposicionarte-2026\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperformance\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],"web","web performance","audit","improve","site","page","quality","user","fix","use","up","optimize","time","speed","user experience","2026-11-10 10:12:30",false,"---\nname: performance\ndescription: Optimize web performance for faster loading and better user experience. Use when asked to \"speed up my site\", \"optimize performance\", \"reduce load time\", \"fix slow loading\", \"improve page speed\", or \"performance audit\".\nlicense: MIT\nmetadata:\n  author: web-quality-skills\n  version: \"1.0\"\n---\n\n# Performance optimization\n\nDeep performance optimization based on Lighthouse performance audits. Focuses on loading speed, runtime efficiency, and resource optimization.\n\n## How it works\n\n1. Identify performance bottlenecks in code and assets\n2. Prioritize by impact on Core Web Vitals\n3. Provide specific optimizations with code examples\n4. Measure improvement with before\u002Fafter metrics\n\n## Performance budget\n\n| Resource | Budget | Rationale |\n|----------|--------|-----------|\n| Total page weight | \u003C 1.5 MB | 3G loads in ~4s |\n| JavaScript (compressed) | \u003C 300 KB | Parsing + execution time |\n| CSS (compressed) | \u003C 100 KB | Render blocking |\n| Images (above-fold) | \u003C 500 KB | LCP impact |\n| Fonts | \u003C 100 KB | FOIT\u002FFOUT prevention |\n| Third-party | \u003C 200 KB | Uncontrolled latency |\n\n## Critical rendering path\n\n### Server response\n* **TTFB \u003C 800ms.** Time to First Byte should be fast. Use CDN, caching, and efficient backends.\n* **Enable compression.** Gzip or Brotli for text assets. Brotli preferred (15-20% smaller).\n* **HTTP\u002F2 or HTTP\u002F3.** Multiplexing reduces connection overhead.\n* **Edge caching.** Cache HTML at CDN edge when possible.\n\n### Resource loading\n\n**Preconnect to required origins:**\n```html\n\u003Clink rel=\"preconnect\" href=\"https:\u002F\u002Ffonts.googleapis.com\">\n\u003Clink rel=\"preconnect\" href=\"https:\u002F\u002Fcdn.example.com\" crossorigin>\n```\n\n**Preload critical resources:**\n```html\n\u003C!-- LCP image -->\n\u003Clink rel=\"preload\" href=\"\u002Fhero.webp\" as=\"image\" fetchpriority=\"high\">\n\n\u003C!-- Critical font -->\n\u003Clink rel=\"preload\" href=\"\u002Ffont.woff2\" as=\"font\" type=\"font\u002Fwoff2\" crossorigin>\n```\n\n**Defer non-critical CSS:**\n```html\n\u003C!-- Critical CSS inlined -->\n\u003Cstyle>\u002F* Above-fold styles *\u002F\u003C\u002Fstyle>\n\n\u003C!-- Non-critical CSS -->\n\u003Clink rel=\"preload\" href=\"\u002Fstyles.css\" as=\"style\" onload=\"this.onload=null;this.rel='stylesheet'\">\n\u003Cnoscript>\u003Clink rel=\"stylesheet\" href=\"\u002Fstyles.css\">\u003C\u002Fnoscript>\n```\n\n### JavaScript optimization\n\n**Defer non-essential scripts:**\n```html\n\u003C!-- Parser-blocking (avoid) -->\n\u003Cscript src=\"\u002Fcritical.js\">\u003C\u002Fscript>\n\n\u003C!-- Deferred (preferred) -->\n\u003Cscript defer src=\"\u002Fapp.js\">\u003C\u002Fscript>\n\n\u003C!-- Async (for independent scripts) -->\n\u003Cscript async src=\"\u002Fanalytics.js\">\u003C\u002Fscript>\n\n\u003C!-- Module (deferred by default) -->\n\u003Cscript type=\"module\" src=\"\u002Fapp.mjs\">\u003C\u002Fscript>\n```\n\n**Code splitting patterns:**\n```javascript\n\u002F\u002F Route-based splitting\nconst Dashboard = lazy(() => import('.\u002FDashboard'));\n\n\u002F\u002F Component-based splitting\nconst HeavyChart = lazy(() => import('.\u002FHeavyChart'));\n\n\u002F\u002F Feature-based splitting\nif (user.isPremium) {\n  const PremiumFeatures = await import('.\u002FPremiumFeatures');\n}\n```\n\n**Tree shaking best practices:**\n```javascript\n\u002F\u002F ❌ Imports entire library\nimport _ from 'lodash';\n_.debounce(fn, 300);\n\n\u002F\u002F ✅ Imports only what's needed\nimport debounce from 'lodash\u002Fdebounce';\ndebounce(fn, 300);\n```\n\n## Image optimization\n\n### Format selection\n| Format | Use case | Browser support |\n|--------|----------|-----------------|\n| AVIF | Photos, best compression | 92%+ |\n| WebP | Photos, good fallback | 97%+ |\n| PNG | Graphics with transparency | Universal |\n| SVG | Icons, logos, illustrations | Universal |\n\n### Responsive images\n```html\n\u003Cpicture>\n  \u003C!-- AVIF for modern browsers -->\n  \u003Csource \n    type=\"image\u002Favif\"\n    srcset=\"hero-400.avif 400w,\n            hero-800.avif 800w,\n            hero-1200.avif 1200w\"\n    sizes=\"(max-width: 600px) 100vw, 50vw\">\n  \n  \u003C!-- WebP fallback -->\n  \u003Csource \n    type=\"image\u002Fwebp\"\n    srcset=\"hero-400.webp 400w,\n            hero-800.webp 800w,\n            hero-1200.webp 1200w\"\n    sizes=\"(max-width: 600px) 100vw, 50vw\">\n  \n  \u003C!-- JPEG fallback -->\n  \u003Cimg \n    src=\"hero-800.jpg\"\n    srcset=\"hero-400.jpg 400w,\n            hero-800.jpg 800w,\n            hero-1200.jpg 1200w\"\n    sizes=\"(max-width: 600px) 100vw, 50vw\"\n    width=\"1200\" \n    height=\"600\"\n    alt=\"Hero image\"\n    loading=\"lazy\"\n    decoding=\"async\">\n\u003C\u002Fpicture>\n```\n\n### LCP image priority\n```html\n\u003C!-- Above-fold LCP image: eager loading, high priority -->\n\u003Cimg \n  src=\"hero.webp\" \n  fetchpriority=\"high\"\n  loading=\"eager\"\n  decoding=\"sync\"\n  alt=\"Hero\">\n\n\u003C!-- Below-fold images: lazy loading -->\n\u003Cimg \n  src=\"product.webp\" \n  loading=\"lazy\"\n  decoding=\"async\"\n  alt=\"Product\">\n```\n\n## Font optimization\n\n### Loading strategy\n```css\n\u002F* System font stack as fallback *\u002F\nbody {\n  font-family: 'Custom Font', -apple-system, BlinkMacSystemFont, \n               'Segoe UI', Roboto, sans-serif;\n}\n\n\u002F* Prevent invisible text *\u002F\n@font-face {\n  font-family: 'Custom Font';\n  src: url('\u002Ffonts\u002Fcustom.woff2') format('woff2');\n  font-display: swap; \u002F* or optional for non-critical *\u002F\n  font-weight: 400;\n  font-style: normal;\n  unicode-range: U+0000-00FF; \u002F* Subset to Latin *\u002F\n}\n```\n\n### Preloading critical fonts\n```html\n\u003Clink rel=\"preload\" href=\"\u002Ffonts\u002Fheading.woff2\" as=\"font\" type=\"font\u002Fwoff2\" crossorigin>\n```\n\n### Variable fonts\n```css\n\u002F* One file instead of multiple weights *\u002F\n@font-face {\n  font-family: 'Inter';\n  src: url('\u002Ffonts\u002FInter-Variable.woff2') format('woff2-variations');\n  font-weight: 100 900;\n  font-display: swap;\n}\n```\n\n## Caching strategy\n\n### Cache-Control headers\n```\n# HTML (short or no cache)\nCache-Control: no-cache, must-revalidate\n\n# Static assets with hash (immutable)\nCache-Control: public, max-age=31536000, immutable\n\n# Static assets without hash\nCache-Control: public, max-age=86400, stale-while-revalidate=604800\n\n# API responses\nCache-Control: private, max-age=0, must-revalidate\n```\n\n### Service worker caching\n```javascript\n\u002F\u002F Cache-first for static assets\nself.addEventListener('fetch', (event) => {\n  if (event.request.destination === 'image' ||\n      event.request.destination === 'style' ||\n      event.request.destination === 'script') {\n    event.respondWith(\n      caches.match(event.request).then((cached) => {\n        return cached || fetch(event.request).then((response) => {\n          const clone = response.clone();\n          caches.open('static-v1').then((cache) => cache.put(event.request, clone));\n          return response;\n        });\n      })\n    );\n  }\n});\n```\n\n## Runtime performance\n\n### Avoid layout thrashing\n```javascript\n\u002F\u002F ❌ Forces multiple reflows\nelements.forEach(el => {\n  const height = el.offsetHeight; \u002F\u002F Read\n  el.style.height = height + 10 + 'px'; \u002F\u002F Write\n});\n\n\u002F\u002F ✅ Batch reads, then batch writes\nconst heights = elements.map(el => el.offsetHeight); \u002F\u002F All reads\nelements.forEach((el, i) => {\n  el.style.height = heights[i] + 10 + 'px'; \u002F\u002F All writes\n});\n```\n\n### Debounce expensive operations\n```javascript\nfunction debounce(fn, delay) {\n  let timeout;\n  return (...args) => {\n    clearTimeout(timeout);\n    timeout = setTimeout(() => fn(...args), delay);\n  };\n}\n\n\u002F\u002F Debounce scroll\u002Fresize handlers\nwindow.addEventListener('scroll', debounce(handleScroll, 100));\n```\n\n### Use requestAnimationFrame\n```javascript\n\u002F\u002F ❌ May cause jank\nsetInterval(animate, 16);\n\n\u002F\u002F ✅ Synced with display refresh\nfunction animate() {\n  \u002F\u002F Animation logic\n  requestAnimationFrame(animate);\n}\nrequestAnimationFrame(animate);\n```\n\n### Virtualize long lists\n```javascript\n\u002F\u002F For lists > 100 items, render only visible items\n\u002F\u002F Use libraries like react-window, vue-virtual-scroller, or native CSS:\n.virtual-list {\n  content-visibility: auto;\n  contain-intrinsic-size: 0 50px; \u002F* Estimated item height *\u002F\n}\n```\n\n## Third-party scripts\n\n### Load strategies\n```javascript\n\u002F\u002F ❌ Blocks main thread\n\u003Cscript src=\"https:\u002F\u002Fanalytics.example.com\u002Fscript.js\">\u003C\u002Fscript>\n\n\u002F\u002F ✅ Async loading\n\u003Cscript async src=\"https:\u002F\u002Fanalytics.example.com\u002Fscript.js\">\u003C\u002Fscript>\n\n\u002F\u002F ✅ Delay until interaction\n\u003Cscript>\ndocument.addEventListener('DOMContentLoaded', () => {\n  const observer = new IntersectionObserver((entries) => {\n    if (entries[0].isIntersecting) {\n      const script = document.createElement('script');\n      script.src = 'https:\u002F\u002Fwidget.example.com\u002Fembed.js';\n      document.body.appendChild(script);\n      observer.disconnect();\n    }\n  });\n  observer.observe(document.querySelector('#widget-container'));\n});\n\u003C\u002Fscript>\n```\n\n### Facade pattern\n```html\n\u003C!-- Show static placeholder until interaction -->\n\u003Cdiv class=\"youtube-facade\" \n     data-video-id=\"abc123\" \n     onclick=\"loadYouTube(this)\">\n  \u003Cimg src=\"\u002Fthumbnails\u002Fabc123.jpg\" alt=\"Video title\">\n  \u003Cbutton aria-label=\"Play video\">▶\u003C\u002Fbutton>\n\u003C\u002Fdiv>\n```\n\n## Measurement\n\n### Key metrics\n| Metric | Target | Tool |\n|--------|--------|------|\n| LCP | \u003C 2.5s | Lighthouse, CrUX |\n| FCP | \u003C 1.8s | Lighthouse |\n| Speed Index | \u003C 3.4s | Lighthouse |\n| TBT | \u003C 200ms | Lighthouse |\n| TTI | \u003C 3.8s | Lighthouse |\n\n### Testing commands\n```bash\n# Lighthouse CLI\nnpx lighthouse https:\u002F\u002Fexample.com --output html --output-path report.html\n\n# Web Vitals library\nimport {onLCP, onINP, onCLS} from 'web-vitals';\nonLCP(console.log);\nonINP(console.log);\nonCLS(console.log);\n```\n\n## References\n\nFor Core Web Vitals specific optimizations, see [Core Web Vitals](..\u002Fcore-web-vitals\u002FSKILL.md).\n","# Performance optimization\n\nDeep performance optimization based on Lighthouse performance audits. Focuses on loading speed, runtime efficiency, and resource optimization.\n\n## How it works\n\n1. Identify performance bottlenecks in code and assets\n2. Prioritize by impact on Core Web Vitals\n3. Provide specific optimizations with code examples\n4. Measure improvement with before\u002Fafter metrics\n\n## Performance budget\n\n| Resource | Budget | Rationale |\n|----------|--------|-----------|\n| Total page weight | \u003C 1.5 MB | 3G loads in ~4s |\n| JavaScript (compressed) | \u003C 300 KB | Parsing + execution time |\n| CSS (compressed) | \u003C 100 KB | Render blocking |\n| Images (above-fold) | \u003C 500 KB | LCP impact |\n| Fonts | \u003C 100 KB | FOIT\u002FFOUT prevention |\n| Third-party | \u003C 200 KB | Uncontrolled latency |\n\n## Critical rendering path\n\n### Server response\n* **TTFB \u003C 800ms.** Time to First Byte should be fast. Use CDN, caching, and efficient backends.\n* **Enable compression.** Gzip or Brotli for text assets. Brotli preferred (15-20% smaller).\n* **HTTP\u002F2 or HTTP\u002F3.** Multiplexing reduces connection overhead.\n* **Edge caching.** Cache HTML at CDN edge when possible.\n\n### Resource loading\n\n**Preconnect to required origins:**\n```html\n\u003Clink rel=\"preconnect\" href=\"https:\u002F\u002Ffonts.googleapis.com\">\n\u003Clink rel=\"preconnect\" href=\"https:\u002F\u002Fcdn.example.com\" crossorigin>\n```\n\n**Preload critical resources:**\n```html\n\u003C!-- LCP image -->\n\u003Clink rel=\"preload\" href=\"\u002Fhero.webp\" as=\"image\" fetchpriority=\"high\">\n\n\u003C!-- Critical font -->\n\u003Clink rel=\"preload\" href=\"\u002Ffont.woff2\" as=\"font\" type=\"font\u002Fwoff2\" crossorigin>\n```\n\n**Defer non-critical CSS:**\n```html\n\u003C!-- Critical CSS inlined -->\n\u003Cstyle>\u002F* Above-fold styles *\u002F\u003C\u002Fstyle>\n\n\u003C!-- Non-critical CSS -->\n\u003Clink rel=\"preload\" href=\"\u002Fstyles.css\" as=\"style\" onload=\"this.onload=null;this.rel='stylesheet'\">\n\u003Cnoscript>\u003Clink rel=\"stylesheet\" href=\"\u002Fstyles.css\">\u003C\u002Fnoscript>\n```\n\n### JavaScript optimization\n\n**Defer non-essential scripts:**\n```html\n\u003C!-- Parser-blocking (avoid) -->\n\u003Cscript src=\"\u002Fcritical.js\">\u003C\u002Fscript>\n\n\u003C!-- Deferred (preferred) -->\n\u003Cscript defer src=\"\u002Fapp.js\">\u003C\u002Fscript>\n\n\u003C!-- Async (for independent scripts) -->\n\u003Cscript async src=\"\u002Fanalytics.js\">\u003C\u002Fscript>\n\n\u003C!-- Module (deferred by default) -->\n\u003Cscript type=\"module\" src=\"\u002Fapp.mjs\">\u003C\u002Fscript>\n```\n\n**Code splitting patterns:**\n```javascript\n\u002F\u002F Route-based splitting\nconst Dashboard = lazy(() => import('.\u002FDashboard'));\n\n\u002F\u002F Component-based splitting\nconst HeavyChart = lazy(() => import('.\u002FHeavyChart'));\n\n\u002F\u002F Feature-based splitting\nif (user.isPremium) {\n  const PremiumFeatures = await import('.\u002FPremiumFeatures');\n}\n```\n\n**Tree shaking best practices:**\n```javascript\n\u002F\u002F ❌ Imports entire library\nimport _ from 'lodash';\n_.debounce(fn, 300);\n\n\u002F\u002F ✅ Imports only what's needed\nimport debounce from 'lodash\u002Fdebounce';\ndebounce(fn, 300);\n```\n\n## Image optimization\n\n### Format selection\n| Format | Use case | Browser support |\n|--------|----------|-----------------|\n| AVIF | Photos, best compression | 92%+ |\n| WebP | Photos, good fallback | 97%+ |\n| PNG | Graphics with transparency | Universal |\n| SVG | Icons, logos, illustrations | Universal |\n\n### Responsive images\n```html\n\u003Cpicture>\n  \u003C!-- AVIF for modern browsers -->\n  \u003Csource \n    type=\"image\u002Favif\"\n    srcset=\"hero-400.avif 400w,\n            hero-800.avif 800w,\n            hero-1200.avif 1200w\"\n    sizes=\"(max-width: 600px) 100vw, 50vw\">\n  \n  \u003C!-- WebP fallback -->\n  \u003Csource \n    type=\"image\u002Fwebp\"\n    srcset=\"hero-400.webp 400w,\n            hero-800.webp 800w,\n            hero-1200.webp 1200w\"\n    sizes=\"(max-width: 600px) 100vw, 50vw\">\n  \n  \u003C!-- JPEG fallback -->\n  \u003Cimg \n    src=\"hero-800.jpg\"\n    srcset=\"hero-400.jpg 400w,\n            hero-800.jpg 800w,\n            hero-1200.jpg 1200w\"\n    sizes=\"(max-width: 600px) 100vw, 50vw\"\n    width=\"1200\" \n    height=\"600\"\n    alt=\"Hero image\"\n    loading=\"lazy\"\n    decoding=\"async\">\n\u003C\u002Fpicture>\n```\n\n### LCP image priority\n```html\n\u003C!-- Above-fold LCP image: eager loading, high priority -->\n\u003Cimg \n  src=\"hero.webp\" \n  fetchpriority=\"high\"\n  loading=\"eager\"\n  decoding=\"sync\"\n  alt=\"Hero\">\n\n\u003C!-- Below-fold images: lazy loading -->\n\u003Cimg \n  src=\"product.webp\" \n  loading=\"lazy\"\n  decoding=\"async\"\n  alt=\"Product\">\n```\n\n## Font optimization\n\n### Loading strategy\n```css\n\u002F* System font stack as fallback *\u002F\nbody {\n  font-family: 'Custom Font', -apple-system, BlinkMacSystemFont, \n               'Segoe UI', Roboto, sans-serif;\n}\n\n\u002F* Prevent invisible text *\u002F\n@font-face {\n  font-family: 'Custom Font';\n  src: url('\u002Ffonts\u002Fcustom.woff2') format('woff2');\n  font-display: swap; \u002F* or optional for non-critical *\u002F\n  font-weight: 400;\n  font-style: normal;\n  unicode-range: U+0000-00FF; \u002F* Subset to Latin *\u002F\n}\n```\n\n### Preloading critical fonts\n```html\n\u003Clink rel=\"preload\" href=\"\u002Ffonts\u002Fheading.woff2\" as=\"font\" type=\"font\u002Fwoff2\" crossorigin>\n```\n\n### Variable fonts\n```css\n\u002F* One file instead of multiple weights *\u002F\n@font-face {\n  font-family: 'Inter';\n  src: url('\u002Ffonts\u002FInter-Variable.woff2') format('woff2-variations');\n  font-weight: 100 900;\n  font-display: swap;\n}\n```\n\n## Caching strategy\n\n### Cache-Control headers\n```\n# HTML (short or no cache)\nCache-Control: no-cache, must-revalidate\n\n# Static assets with hash (immutable)\nCache-Control: public, max-age=31536000, immutable\n\n# Static assets without hash\nCache-Control: public, max-age=86400, stale-while-revalidate=604800\n\n# API responses\nCache-Control: private, max-age=0, must-revalidate\n```\n\n### Service worker caching\n```javascript\n\u002F\u002F Cache-first for static assets\nself.addEventListener('fetch', (event) => {\n  if (event.request.destination === 'image' ||\n      event.request.destination === 'style' ||\n      event.request.destination === 'script') {\n    event.respondWith(\n      caches.match(event.request).then((cached) => {\n        return cached || fetch(event.request).then((response) => {\n          const clone = response.clone();\n          caches.open('static-v1').then((cache) => cache.put(event.request, clone));\n          return response;\n        });\n      })\n    );\n  }\n});\n```\n\n## Runtime performance\n\n### Avoid layout thrashing\n```javascript\n\u002F\u002F ❌ Forces multiple reflows\nelements.forEach(el => {\n  const height = el.offsetHeight; \u002F\u002F Read\n  el.style.height = height + 10 + 'px'; \u002F\u002F Write\n});\n\n\u002F\u002F ✅ Batch reads, then batch writes\nconst heights = elements.map(el => el.offsetHeight); \u002F\u002F All reads\nelements.forEach((el, i) => {\n  el.style.height = heights[i] + 10 + 'px'; \u002F\u002F All writes\n});\n```\n\n### Debounce expensive operations\n```javascript\nfunction debounce(fn, delay) {\n  let timeout;\n  return (...args) => {\n    clearTimeout(timeout);\n    timeout = setTimeout(() => fn(...args), delay);\n  };\n}\n\n\u002F\u002F Debounce scroll\u002Fresize handlers\nwindow.addEventListener('scroll', debounce(handleScroll, 100));\n```\n\n### Use requestAnimationFrame\n```javascript\n\u002F\u002F ❌ May cause jank\nsetInterval(animate, 16);\n\n\u002F\u002F ✅ Synced with display refresh\nfunction animate() {\n  \u002F\u002F Animation logic\n  requestAnimationFrame(animate);\n}\nrequestAnimationFrame(animate);\n```\n\n### Virtualize long lists\n```javascript\n\u002F\u002F For lists > 100 items, render only visible items\n\u002F\u002F Use libraries like react-window, vue-virtual-scroller, or native CSS:\n.virtual-list {\n  content-visibility: auto;\n  contain-intrinsic-size: 0 50px; \u002F* Estimated item height *\u002F\n}\n```\n\n## Third-party scripts\n\n### Load strategies\n```javascript\n\u002F\u002F ❌ Blocks main thread\n\u003Cscript src=\"https:\u002F\u002Fanalytics.example.com\u002Fscript.js\">\u003C\u002Fscript>\n\n\u002F\u002F ✅ Async loading\n\u003Cscript async src=\"https:\u002F\u002Fanalytics.example.com\u002Fscript.js\">\u003C\u002Fscript>\n\n\u002F\u002F ✅ Delay until interaction\n\u003Cscript>\ndocument.addEventListener('DOMContentLoaded', () => {\n  const observer = new IntersectionObserver((entries) => {\n    if (entries[0].isIntersecting) {\n      const script = document.createElement('script');\n      script.src = 'https:\u002F\u002Fwidget.example.com\u002Fembed.js';\n      document.body.appendChild(script);\n      observer.disconnect();\n    }\n  });\n  observer.observe(document.querySelector('#widget-container'));\n});\n\u003C\u002Fscript>\n```\n\n### Facade pattern\n```html\n\u003C!-- Show static placeholder until interaction -->\n\u003Cdiv class=\"youtube-facade\" \n     data-video-id=\"abc123\" \n     onclick=\"loadYouTube(this)\">\n  \u003Cimg src=\"\u002Fthumbnails\u002Fabc123.jpg\" alt=\"Video title\">\n  \u003Cbutton aria-label=\"Play video\">▶\u003C\u002Fbutton>\n\u003C\u002Fdiv>\n```\n\n## Measurement\n\n### Key metrics\n| Metric | Target | Tool |\n|--------|--------|------|\n| LCP | \u003C 2.5s | Lighthouse, CrUX |\n| FCP | \u003C 1.8s | Lighthouse |\n| Speed Index | \u003C 3.4s | Lighthouse |\n| TBT | \u003C 200ms | Lighthouse |\n| TTI | \u003C 3.8s | Lighthouse |\n\n### Testing commands\n```bash\n# Lighthouse CLI\nnpx lighthouse https:\u002F\u002Fexample.com --output html --output-path report.html\n\n# Web Vitals library\nimport {onLCP, onINP, onCLS} from 'web-vitals';\nonLCP(console.log);\nonINP(console.log);\nonCLS(console.log);\n```\n\n## References\n\nFor Core Web Vitals specific optimizations, see [Core Web Vitals](..\u002Fcore-web-vitals\u002FSKILL.md).\n",{"name":5,"license":15,"metadata":39,"description":7},{"author":40,"version":41},"web-quality-skills","1.0","main","75be4e902e7b589398c498b20c11965fb27c9fdb",".agents\u002Fskills\u002Fperformance","https:\u002F\u002Fgithub.com\u002Fagusruiz11\u002Fposicionarte-2026","https:\u002F\u002Fposicionarte-2026.vercel.app","https:\u002F\u002Fgithub.com\u002Fagusruiz11","2026-09-24 04:03:25",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add agusruiz11\u002Fposicionarte-2026 --skill performance",{"tool":55,"command":56},"bunx","bunx skills add agusruiz11\u002Fposicionarte-2026 --skill performance",{"tool":58,"command":59},"pnpm","pnpm dlx skills add agusruiz11\u002Fposicionarte-2026 --skill performance","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fagusruiz11\u002Fposicionarte-2026\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperformance\u002FSKILL.md",true,[],[64,90,112,134,155,169],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":80,"publishedAt":34},"01M6D0M467V4FP2H8GTRW25ESA","web-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\".","https:\u002F\u002Fgithub.com\u002Fagusruiz11\u002Fposicionarte-2026\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fweb-quality-audit\u002FSKILL.md",[70,75],{"categoryNo":71,"categoryName":72,"taxonomyType":73,"taxonomyTypeDesc":74},"01JBSEEDCAT000000000000019","营销推广","SCENARIO","使用场景",{"categoryNo":76,"categoryName":77,"taxonomyType":78,"taxonomyTypeDesc":79},"01JBSEEDCAT000000000000035","市场营销","PROFESSION","适用职业",[19,81,21,25,30,82,28,83,24,23,84,85,86,87,88,5,89],"web quality audit","accessibility","check","Lighthouse","seo","website","best practices","run","review",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":99,"publishedAt":34},"01M6D0KCA27324N369EG03G4RW","vercel-react-native-skills","React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.","https:\u002F\u002Fgithub.com\u002Fagusruiz11\u002Fposicionarte-2026\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fvercel-react-native-skills\u002FSKILL.md",[96],{"categoryNo":97,"categoryName":98,"taxonomyType":73,"taxonomyTypeDesc":74},"01JBSEEDCAT000000000000009","前端开发",[100,101,102,103,104,105,5,106,107,108,109,110,28,111,87],"react","vercel react native skills","react native","vercel","react native skills","components","tasks","platform","expo","mobile","modules","list",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":119,"publishedAt":34},"01M6D0K3FVFNZ3KS30TCJM2SR2","vercel-react-best-practices","React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React\u002FNext.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.","https:\u002F\u002Fgithub.com\u002Fagusruiz11\u002Fposicionarte-2026\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fvercel-react-best-practices\u002FSKILL.md",[118],{"categoryNo":97,"categoryName":98,"taxonomyType":73,"taxonomyTypeDesc":74},[103,120,100,87,121,122,123,124,125,126,127,128,129,130,131,132,105,5,133,106],"react best practices","vercel react best practices","patterns","pages","next","performance optimization","code","refactoring","Optimization","Next.js","data","guidelines","react components","writing",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":141,"publishedAt":34},"01M6D0JZ7XBQQ3PJZGPG6ZR6Q9","vercel-composition-patterns","React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.","https:\u002F\u002Fgithub.com\u002Fagusruiz11\u002Fposicionarte-2026\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fvercel-composition-patterns\u002FSKILL.md",[140],{"categoryNo":97,"categoryName":98,"taxonomyType":73,"taxonomyTypeDesc":74},[142,143,103,122,127,144,145,28,146,147,148,149,150,151,106,152,153,154,100,105],"Composition","vercel composition patterns","compound","reusable","context","react composition","api","Providers","component architecture","libraries","api changes","architecture","component",{"skillNo":156,"name":85,"nameZh":6,"description":157,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":158,"categories":159,"keywords":162,"publishedAt":34},"01M6D0FD6JDPAGQ2JRVFK3C0SM","Optimize for search engine visibility and ranking. Use when asked to \"improve SEO\", \"optimize for search\", \"fix meta tags\", \"add structured data\", \"sitemap optimization\", or \"search engine optimization\".","https:\u002F\u002Fgithub.com\u002Fagusruiz11\u002Fposicionarte-2026\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fseo\u002FSKILL.md",[160,161],{"categoryNo":71,"categoryName":72,"taxonomyType":73,"taxonomyTypeDesc":74},{"categoryNo":76,"categoryName":77,"taxonomyType":78,"taxonomyTypeDesc":79},[85,19,30,28,27,25,163,22,164,165,130,128,166,167,168],"engine","Meta Tags","Meta","search","structured","structured data",{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":175,"publishedAt":34},"01M6D01E5X6N6NKVS6XZVW84GJ","core-web-vitals","Optimize Core Web Vitals (LCP, INP, CLS) for better page experience and search ranking. Use when asked to \"improve Core Web Vitals\", \"fix LCP\", \"reduce CLS\", \"optimize INP\", \"page experience optimization\", or \"fix layout shifts\".","https:\u002F\u002Fgithub.com\u002Fagusruiz11\u002Fposicionarte-2026\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcore-web-vitals\u002FSKILL.md",[],[176,19,177,178,30,28,27,25,24,22,128,166],"core","core web vitals","layout"]