performance-optimization
하는 일
애플리케이션의 느린 부분을 찾아 고치도록 돕는 도구입니다. 성능을 측정하고, 병목 지점을 찾고, 고치는 방법을 제안해 사용자에게 더 빠르게 작동하도록 합니다.
사용하는 경우
- ✓애플리케이션이 로드되는 데 너무 오래 걸릴 때.
- ✓사용자가 느리다고 불평할 때.
- ✓Core Web Vitals 같은 성능 지표가 낮을 때.
스킬 링크
https://github.com/addyosmani/agent-skills/blob/main/skills/performance-optimization/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“웹사이트 로딩이 너무 오래 걸립니다. 성능을 최적화하도록 도와주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
도구는 먼저 애플리케이션의 현재 성능을 측정해 문제가 어디에 있는지 파악합니다. 그다음 다른 것은 바꾸지 않고 그 특정 지점을 고치는 데 집중하며, 개선이 실제로 있었는지 검증합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Performance Optimization
Overview
Measure before optimizing. Performance work without measurement is guessing — and guessing leads to premature optimization that adds complexity without improving what matters. Profile first, identify the actual bottleneck, fix it, measure again. Optimize only what measurements prove matters.
When to Use
- Performance requirements exist in the spec (load time budgets, response time SLAs)
- Users or monitoring report slow behavior
- Core Web Vitals scores are below thresholds
- You suspect a change introduced a regression
- Building features that handle large datasets or high traffic
When NOT to use: Don't optimize before you have evidence of a problem. Premature optimization adds complexity that costs more than the performance it gains.
Core Web Vitals Targets
| Metric | Good | Needs Improvement | Poor |
|---|---|---|---|
| LCP (Largest Contentful Paint) | ≤ 2.5s | ≤ 4.0s | > 4.0s |
| INP (Interaction to Next Paint) | ≤ 200ms | ≤ 500ms | > 500ms |
| CLS (Cumulative Layout Shift) | ≤ 0.1 | ≤ 0.25 | > 0.25 |
The Optimization Workflow
1. MEASURE → Establish baseline with real data
2. IDENTIFY → Find the actual bottleneck (not assumed)
3. FIX → Address the specific bottleneck
4. VERIFY → Measure again; keep or revert
5. GUARD → Add monitoring or tests to prevent regression
Step 1: Measure
Two complementary approaches — use both:
- Synthetic (Lighthouse, DevTools Performance tab): Controlled conditions, reproducible. Best for CI regression detection and isolating specific issues.
- RUM (web-vitals library, CrUX): Real user data in real conditions. Required to validate that a fix actually improved user experience.
Frontend:
// Synthetic: Lighthouse in Chrome DevTools (or CI)
// Chrome DevTools → Performance tab → Record
// Chrome DevTools MCP → Performance trace
// RUM: Web Vitals library in code
import { onLCP, onINP, onCLS } from 'web-vitals';
onLCP(console.log);
onINP(console.log);
onCLS(console.log);
Backend:
// Response time logging
// Application Performance Monitoring (APM)
// Database query logging with timing
// Simple timing
console.time('db-query');
const result = await db.query(...);
console.timeEnd('db-query');
Where to Start Measuring
Use the symptom to decide what to measure first:
What is slow?
├── First page load
│ ├── Large bundle? --> Measure bundle size, check code splitting
│ ├── Slow server response? --> Measure TTFB in DevTools Network waterfall
│ │ ├── DNS long? --> Add dns-prefetch / preconnect for known origins
│ │ ├── TCP/TLS long? --> Enable HTTP/2, check edge deployment, keep-alive
│ │ └── Waiting (server) long? --> Profile backend, check queries and caching
│ └── Render-blocking resources? --> Check network waterfall for CSS/JS blocking
├── Interaction feels sluggish
│ ├── UI freezes on click? --> Profile main thread, look for long tasks (>50ms)
│ ├── Form input lag? --> Check re-renders, controlled component overhead
│ └── Animation jank? --> Check layout thrashing, forced reflows
├── Page after navigation
│ ├── Data loading? --> Measure API response times, check for waterfalls
│ └── Client rendering? --> Profile component render time, check for N+1 fetches
└── Backend / API
├── Single endpoint slow? --> Profile database queries, check indexes
├── All endpoints slow? --> Check connection pool, memory, CPU
└── Intermittent slowness? --> Check for lock contention, GC pauses, external deps
Step 2: Identify the Bottleneck
Common bottlenecks by category:
Frontend:
| Symptom | Likely Cause | Investigation |
|---|---|---|
| Slow LCP | Large images, render-blocking resources, slow server | Check network waterfall, image sizes |
| High CLS | Images without dimensions, late-loading content, font shifts | Check layout shift attribution |
| Poor INP | Heavy JavaScript on main thread, large DOM updates | Check long tasks in Performance trace |
| Slow initial load | Large bundle, many network requests | Check bundle size, code splitting |
Backend:
| Symptom | Likely Cause | Investigation |
|---|---|---|
| Slow API responses | N+1 queries, missing indexes, unoptimized queries | Check database query log |
| Memory growth | Leaked references, unbounded caches, large payloads | Heap snapshot analysis |
…
자주 묻는 질문
Core Web Vitals란 무엇인가요?
페이지 로딩 속도, 상호작용성, 시각적 안정성 등 사용자 경험을 측정하는 지표입니다.
성능 병목이란 무엇인가요?
애플리케이션 전체를 느리게 만드는 원인이 되는 부분입니다. 예를 들어 느린 데이터베이스 쿼리나 처리에 오래 걸리는 코드가 있습니다.
측정하기 전에 최적화해야 하나요?
아니요. 문제가 정확히 어디에 있는지 알려면 먼저 측정하는 것이 중요합니다. 측정 없이 최적화하면 상황을 더 나쁘게 하거나 불필요한 복잡성을 더할 수 있습니다.
상세 정보
작성자의 원본 설명
Optimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.
repo: addyosmani/agent-skills
인기도
- GitHub 스타
- 107k
- 순위
- #778
- 라이선스
- MIT
- 업데이트
- 2026. 10. 13.
댓글
- …
이 저장소의 다른 스킬
api-and-interface-design
107k잘 정의된 API와 인터페이스를 만드는 데 도움을 줍니다. 소프트웨어의 서로 다른 부분이 통신하는 방식을 설계할 때 유용합니다.
browser-testing-with-devtools
107k에이전트가 실제 브라우저에서 코드를 직접 테스트하도록 돕습니다. 사용 환경에서 어떻게 작동하는지 확인하고, 오류와 성능 문제를 찾는 데 유용합니다.
ci-cd-and-automation
107k반복 작업을 자동화하고, 프로젝트를 배포하며, 인프라를 관리하도록 에이전트에게 가르칩니다.
code-review-and-quality
107k여러 측면에서 상세한 코드 검토를 수행합니다. 새 변경 사항을 병합하기 전에 품질을 확인하고 향후 문제를 막는 데 유용합니다.