본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)7.1k · #13563

perf-web-optimization

하는 일

이 스킬은 큰 이미지, 무거운 스크립트, 레이아웃 흔들림처럼 웹사이트를 느리게 만드는 원인을 AI가 찾아 고치게 합니다. 페이지를 더 빠르게 만들고 싶은 개발자와 사이트 소유자를 위한 것입니다.

사용하는 경우

  • ✓웹사이트가 느리게 느껴지고 원인을 알고 싶을 때.
  • ✓번들 크기를 줄이거나 콘텐츠를 지연 로드하고 싶을 때.
  • ✓로딩 중 페이지가 흔들려서 레이아웃 이동을 고치고 싶을 때.

스킬 링크

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에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(performance)/perf-web-optimization/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 랜딩 페이지가 휴대폰에서 느립니다. 무엇이 느리게 만드는지 찾아서 가장 큰 문제부터 고쳐 주세요.”

매주 새 스킬 5개. 읽는 데 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
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬