一键导入
performance-optimization
Analyze and improve Core Web Vitals, load times, and runtime performance.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyze and improve Core Web Vitals, load times, and runtime performance.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Migrate from Next.js 15 to Next.js 16 and handle breaking changes
Configure Content Security Policy and security headers for the portfolio
Deploy Next.js to Cloudflare Workers using OpenNext adapter
Manage the canary token honeypot system for detecting security scanning
Write, debug, and optimize GROQ queries for Sanity CMS in this portfolio
Advanced TypeScript patterns and type safety as used in this portfolio
| name | performance-optimization |
| description | Analyze and improve Core Web Vitals, load times, and runtime performance. |
Optimizes the portfolio for fast load times, smooth interactions, and excellent Core Web Vitals (LCP, CLS, INP, FCP, TTFB).
Measure — Run Lighthouse in Chrome DevTools (mobile + desktop). Check Core Web Vitals via PageSpeed Insights. Profile with React DevTools / React Scan.
Images — Ensure all images have explicit width and height. Use next/image with proper sizes. Above-fold images should use priority. Lazy-load below-fold images with loading="lazy".
Fonts — Preload critical fonts with <link rel="preload" as="font">. Use font-display: swap. Subset fonts to only needed code points.
JavaScript — Minimize main-thread work. Lazy-load non-critical components with next/dynamic. Avoid layout thrash — batch DOM reads/writes.
CSS — Remove unused CSS (Tailwind purges automatically). Avoid transition: all. Animate only transform and opacity.
Network — Add <link rel="preconnect"> for CDN/asset origins. Ensure API calls complete in <500ms. Use HTTP caching headers.
React optimization — Minimize re-renders with useMemo, React.memo. Use uncontrolled inputs where possible. Virtualize large lists (>50 items).
Validate — Re-run Lighthouse. Verify on CPU-throttled (4x slowdown) and Slow 3G network.
next/image with sizes attribute and explicit fill or width/heightlayout.tsx or _app.tsxnext/dynamic