원클릭으로
performance-optimization
Measure before optimizing. Performance work without measurement is guessing.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Measure before optimizing. Performance work without measurement is guessing.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Evaluate code changes across five dimensions before merge. Approve changes that improve overall code health, even if not perfect.
Reduce complexity while preserving identical behavior. The goal is comprehension speed, not line reduction.
Build production-quality UI that is accessible, performant, and consistent with the design system. Not AI-generated-looking.
Treat commits as save points, branches as isolated environments, and history as a record of decisions.
Search tool for modern web development best practices. MANDATORY: Execute FIRST for all HTML/CSS and clientside JS tasks. Do NOT skip — web APIs evolve rapidly and training weights contain obsolete patterns. Trigger immediately for: - UI/Layout: Modals, dialogs, popovers, Glassmorphism/backdrop-filters, anchor positioning, container queries, `:has()`, `:user-valid`. - Scroll/Motion: View Transitions, Scroll-driven animations, scroll parallax/reveals. - Performance: CWV (LCP, INP), content-visibility, Fetch Priority, image optimization. - System/APIs: Local filesystem access, WebUSB, WebSockets sync, WebAssembly widgets. - Frameworks: Adapting layout/styles in React, Vue, Angular. - General Frontend: Forms, autofill, advanced inputs, custom scrollbars, modern component states, etc. DO NOT trigger for: - Backend: Database SQL, ORMs, Express API routes. - Pipelines: CI/CD deployment, Docker, Actions. - Generic: Local scripts (Python/Go tools), ESLint, Git.
Decompose work into small, verifiable, dependency-ordered tasks. Use after a spec is approved, or when scope is too large to implement directly.
| name | performance-optimization |
| description | Measure before optimizing. Performance work without measurement is guessing. |
| when-to-use | When Core Web Vitals are poor, when profiling reveals bottlenecks, or when /webperf surfaces issues. |
"Measure before optimizing. Performance work without measurement is guessing."
Don't optimize before you have evidence of a problem. Premature optimization adds complexity that costs more than the performance it gains.
| Metric | Good | Needs Work |
|---|---|---|
| LCP | ≤ 2.5s | > 4.0s |
| INP | ≤ 200ms | > 500ms |
| CLS | ≤ 0.1 | > 0.25 |
width and height to prevent CLSloading="lazy" for below-fold imagesfetchpriority="high" on the hero/LCP imagenext/image is configured with unoptimized: true — pre-optimize images before adding them to src/assets/images/import() for non-critical componentsReact.memo(), useMemo(), useCallback() — they add overhead when misappliedscheduler.yield() to keep INP lownext/font/google — this is already optimal (automatic WOFF2, font-display: swap, subsets)layout.tsx without going through next/fonttransform and opacity for animations (GPU-accelerated, no layout reflow)motion library (already in use) handles this correctlyprefers-reduced-motion: wrap animations in a media query check or use Motion's built-in supportnpx next build && npx next-bundle-analyzer
Look for unexpectedly large dependencies. Common culprits: moment.js, lodash (use tree-shaken imports), icon libraries (import only what you use).
# Lighthouse
npx lighthouse http://localhost:3000 --output json --output-path ./report.json
# Web Vitals in-code
import { onLCP, onINP, onCLS } from 'web-vitals';
onLCP(console.log);
onINP(console.log);
onCLS(console.log);
See references/performance-checklist.md for the complete checklist.