web-vitals
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-03-27
- Stars
- ★ 3
- Forks
- 1
02 资源文件 6
- 脚本examples/brc77-private-sig.ts3.0 KB
- 脚本examples/bsm-sign-verify.ts1.9 KB
- 脚本examples/sigma-multi-sig.ts3.1 KB
- 脚本examples/sigma-template.ts2.2 KB
- 参考文档references/brc-77-spec.md4.9 KB
- 参考文档references/sigma-advanced.md5.1 KB
03 SKILL.md 正文
Core Web Vitals Optimization
Metrics
- LCP (Largest Contentful Paint): < 2.5s — largest visible element render time
- INP (Interaction to Next Paint): < 200ms — responsiveness to user input
- CLS (Cumulative Layout Shift): < 0.1 — visual stability
LCP Optimization
- Preload hero images:
<link rel="preload" as="image"> - Use
next/imagewithpriorityfor above-the-fold images - Minimize render-blocking CSS: inline critical CSS, defer non-critical
- Server-side render critical content (avoid client-only data fetching for LCP elements)
- Avoid lazy loading above-the-fold content
INP Optimization
- Keep event handlers < 50ms; offload heavy work to
requestIdleCallbackor Web Workers - Use
React.startTransitionfor non-urgent state updates - Debounce/throttle input handlers (search, scroll, resize)
- Avoid long tasks: split > 50ms tasks using
scheduler.yield()or chunking - Use
useDeferredValuefor expensive re-renders triggered by user input
CLS Optimization
- Set explicit
width/heightoraspect-ratioon images, videos, iframes - Reserve space for dynamic content (skeleton placeholders)
- Avoid inserting content above existing content (banners, ads)
- Use
transformanimations instead of layout-triggering properties (top, left, width, height) - Font loading:
font-display: swap+ preload critical fonts
Next.js Specifics
@vercel/speed-insightsfor real-user monitoringnext/imagehandles sizing, lazy loading, format optimizationnext/fonteliminates font CLS with automaticsize-adjust- Route prefetching:
<Link>auto-prefetches in viewport - Streaming SSR with
loading.tsxreduces perceived LCP
04 同仓库更多 Skills
zustand
Zustand state management guide. Use when working with store code (src/store/**), implementing actions, managing state, or creating slices. Triggers on Zustand store development, state management questions, or action implementation.
vercel-storage
Vercel storage expert guidance — Blob, Edge Config, and Marketplace storage (Neon Postgres, Upstash Redis). Use when choosing, configuring, or using data storage with Vercel applications.
vercel-functions
Vercel Functions expert guidance — Serverless Functions, Edge Functions, Fluid Compute, streaming, Cron Jobs, and runtime configuration. Use when configuring, debugging, or optimizing server-side code running on Vercel.
ui-ux-pro-max
UI/UX design intelligence for web and mobile. Includes 50+ styles, 161 color palettes, 57 font pairings, 161 product types, 99 UX guidelines, and 25 chart types across 10 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui, and HTML/CSS). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, and check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, and mobile app. Elements: button, modal, navbar, sidebar, card, table, form, and chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, and flat design. Topics: color systems, accessibility, animation, layout, typography, font pairing, spacing, interaction states, shadow, and gradient. Integrations: shadcn/ui MCP for component search and examples.
turborepo
Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines, dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment variables, internal packages, monorepo structure/best practices, and boundaries. Use when user: configures tasks/workflows/pipelines, creates packages, sets up monorepo, shares code between apps, runs changed/affected packages, debugs cache, or has apps/packages directories.
turbopack
Turbopack expert guidance. Use when configuring the Next.js bundler, optimizing HMR, debugging build issues, or understanding the Turbopack vs Webpack differences.