मुख्य सामग्री पर जाएँ
Skillpedia
वेबसाइट और UI (frontend)7.1k · #13563

perf-web-optimization

यह क्या करती है

यह स्किल AI को वेबसाइट को धीमा करने वाली चीज़ें ढूंढने और ठीक करने का तरीका बताती है, जैसे बड़ी इमेज, भारी स्क्रिप्ट और लोड होते समय लेआउट का खिसकना। यह उन डेवलपर्स और साइट मालिकों के लिए है जो तेज़ पेज चाहते हैं।

कब इस्तेमाल करें

  • ✓जब वेबसाइट धीमी लगे और आप जानना चाहते हों कि उसका कारण क्या है।
  • ✓जब आप बंडल का आकार घटाना या कंटेंट को लेज़ी लोड करना चाहते हों।
  • ✓जब पेज लोड होते समय इधर-उधर खिसकें और आप लेआउट शिफ़्ट ठीक करना चाहते हों।

Skill का लिंक

https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(performance)/perf-web-optimization/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(performance)/perf-web-optimization/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरा लैंडिंग पेज फ़ोन पर धीमा है। उसकी वजह ढूंढिए और सबसे बड़ी समस्याएँ पहले ठीक कीजिए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

AI एक चक्र का पालन करता है: माप लेना, कारण ढूंढना, असर के हिसाब से उन्हें क्रम देना, सुधार करना, और नतीजे जाँचना।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Web Performance Optimization

Systematic approach: Measure → Identify → Prioritize → Implement → Verify.

Target Metrics

Metric Good Needs Work Poor
LCP < 2.5s 2.5-4s > 4s
INP < 200ms 200-500ms > 500ms
CLS < 0.1 0.1-0.25 > 0.25
TTFB < 800ms 800ms-1.8s > 1.8s

Quick Wins

1. Images (usually biggest impact on LCP)

<!-- Hero/LCP image: eager + high priority -->
<img src="/hero.webp" alt="Hero" width="1200" height="600" loading="eager" fetchpriority="high" decoding="async" />

<!-- Below fold: lazy load -->
<img src="/product.webp" alt="Product" width="400" height="300" loading="lazy" decoding="async" />

Always set width and height to prevent CLS.

2. Fonts (common LCP/CLS culprit)

<!-- Preconnect to font origin -->
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />

<!-- Non-blocking font load -->
<link
  rel="stylesheet"
  href="https://fonts.googleapis.com/css2?family=Inter&display=swap"
  media="print"
  onload="this.media='all'"
/>

3. Third-party Scripts (common INP killer)

<!-- Defer to user interaction -->
<script>
  function loadThirdParty() {
    // Load analytics, chat widgets, etc.
  }
  ;['scroll', 'click', 'touchstart'].forEach((e) => addEventListener(e, loadThirdParty, { once: true, passive: true }))
  setTimeout(loadThirdParty, 5000)
</script>

4. Critical CSS

Inline critical CSS in <head>, defer the rest:

<style>
  /* critical styles */
</style>
<link rel="preload" href="/styles.css" as="style" onload="this.rel='stylesheet'" />

Bundle Analysis

# Webpack
npx webpack-bundle-analyzer dist/stats.json

# Vite
npx vite-bundle-visualizer

# Check package size before installing
npx bundlephobia <package-name>

Common heavy packages to replace:

  • moment (67KB) → date-fns (12KB) or dayjs (2KB)
  • lodash (72KB) → cherry-pick imports or native methods

Code Splitting Patterns

// React lazy
const Chart = lazy(() => import('./Chart'))

// Next.js dynamic
const Admin = dynamic(() => import('./Admin'), { ssr: false })

// Vite/Rollup manual chunks
build: {
  rollupOptions: {
    output: {
      manualChunks: {
        vendor: ['react', 'react-dom']
      }
    }
  }
}

Caching Headers

# Static assets (immutable hash in filename)
Cache-Control: public, max-age=31536000, immutable

# HTML (revalidate)
Cache-Control: no-cache

# API responses
Cache-Control: private, max-age=0, must-revalidate

Measurement

For running audits, reading reports, and setting budgets, use the perf-lighthouse skill.

Checklist

Images

  • Modern formats (WebP/AVIF)
  • Responsive srcset
  • width/height attributes
  • loading="lazy" below fold
  • fetchpriority="high" on LCP image

JavaScript

  • Bundle < 200KB gzipped
  • Code splitting by route
  • Third-party scripts deferred
  • No unused dependencies

CSS

  • Critical CSS inlined
  • Non-critical CSS deferred
  • No unused CSS

Fonts

  • font-display: swap
  • Preconnect to font origin
  • Subset if possible

Detailed Examples

For in-depth optimization patterns, see:

अक्सर पूछे जाने वाले सवाल

क्या यह खास Core Web Vitals को कवर करता है?

उनसे जुड़े खास सुधार एक अलग स्किल करती है।

क्या यह इमेज को भी कवर करता है?

हाँ। इसमें इमेज का आकार, लेज़ी लोडिंग और मुख्य इमेज को प्राथमिकता देना शामिल है।

यह किन मापों को लक्ष्य बनाता है?

यह लोडिंग, प्रतिक्रिया और दृश्य स्थिरता के मापों को लक्ष्य बनाता है, जैसे LCP, INP और CLS।

जानकारी

लेखक का मूल विवरण

Optimize web performance: bundle size, images, caching, lazy loading, and overall page speed. Use when site is slow, reducing bundle size, fixing layout shifts, improving Time to Interactive, or optimizing for Lighthouse scores. Triggers on: web performance, bundle size, page speed, slow site, lazy loading. Do NOT use for Core Web Vitals-specific fixes (use core-web-vitals), running Lighthouse audits (use perf-lighthouse), or Astro-specific optimization (use perf-astro).

repo: tech-leads-club/agent-skills

लोकप्रियता

GitHub स्टार
7.1k
रैंकिंग में स्थान
#13563
लाइसेंस
—
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

component-common-domain-detection

7.1k

यह आपके एजेंट को कोडबेस के कई हिस्सों में दोहराए गए बिज़नेस लॉजिक को ढूँढने और उन्हें मिलाने का तरीका सुझाने में मदद करती है।

कोडिंगसामान्य कोडिंग

component-flattening-analysis

7.1k

यह आपके एजेंट को गलत जगह रखा गया कोड ढूँढने और उलझे हुए कंपोनेंट फ़ोल्डर ढाँचे को सीधा करने में मदद करती है, ताकि हर चीज़ अपनी सही जगह रहे।

कोडिंगसामान्य कोडिंग

component-identification-sizing

7.1k

यह आपके एजेंट को कोडबेस के हिस्सों का नक्शा बनाने और उनका आकार मापने में मदद करती है, ताकि पता चले कि पहले किस मॉड्यूल को तोड़ना है।

कोडिंगसामान्य कोडिंग

coupling-analysis

7.1k

यह आपके एजेंट को जाँचने में मदद करती है कि कोडबेस के हिस्से एक-दूसरे पर कितनी कसकर निर्भर हैं, और पहले कौन से जोड़ ढीले करने चाहिए।

कोडिंगसामान्य कोडिंग

मिलती-जुलती skills