Communitygithub.com

YepAPI/skills

核心網頁指標、延遲載入、程式碼分割與套件分析。

skills 是什麼?

此技能專注於提升網頁應用程式的效能,涵蓋 Core Web Vitals 最佳化、延遲載入、程式碼分割及套件分析等關鍵領域。它適用於 Next.js 等現代前端框架,並提供明確的效能目標(如 LCP < 2.5s)與實作指南。透過 React.lazy() 或 next/dynamic 進行元件延遲載入、按路由分割程式碼、以及使用 WebP/AVIF 格式最佳化圖片,可大幅減少初始載入體積。此外,技能也包含使用 @next/bundle-analyzer 進行套件分析、設定 HTTP 快取與 Service Worker、以及透過資料庫索引與 EXPLAIN ANALYZE 找出慢查詢,最終避免版面位移,確保流暢的使用者體驗。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/YepAPI/skills/tree/HEAD/skills/performance

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

效能

規則

  • Core Web Vitals: LCP < 2.5 秒,INP < 200 毫秒,CLS < 0.1
  • 對摺頁以下的圖片與重量級元件進行延遲載入:React.lazy()、next/dynamic
  • 程式碼分割路由 — 每個頁面僅載入自己的程式碼
  • 最佳化圖片:使用 WebP/AVIF 格式、合適尺寸、next/image 搭配 sizes
  • 套件分析:@next/bundle-analyzer — 識別大型依賴套件
  • 快取:HTTP 快取標頭、Service Worker 用於重複訪問、stale-while-revalidate 策略
  • 資料庫:為經常查詢的欄位建立索引,使用 EXPLAIN ANALYZE 找出慢查詢
  • 避免版面位移:為圖片、影片、嵌入內容設定明確尺寸

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

YepAPI/skills

WCAG 2.1 AA — semantic HTML, keyboard navigation, screen readers.

YepAPI/skills

Experiment setup, variant splitting, statistical significance, and feature flag integration.

YepAPI/skills

CRUD generators, data tables, user management, role-based access, and bulk operations.

YepAPI/skills

Monitor what ChatGPT and Gemini say about your brand using YepAPI.

YepAPI/skills

Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

YepAPI/skills

Commander.js, interactive prompts with Clack, spinners, colors, config files, exit codes, and npm publishing.

YepAPI/skills

cmdk integration, Cmd+K trigger, fuzzy search, grouped actions, keyboard navigation, and dynamic action registration.

YepAPI/skills

Content planning with trend and sentiment data from YepAPI.

YepAPI/skills

Content calendar, keyword-driven planning, and content briefs.

YepAPI/skills

Theme switching with CSS variables, system preference detection, next-themes, and persistence.

YepAPI/skills

Threaded comments, @mentions, reactions, moderation queue, optimistic UI, and cursor pagination.

YepAPI/skills

Competitive analysis between domains using YepAPI.

YepAPI/skills

Layout grids, KPI cards, data tables with sorting/filtering, sidebar navigation, and responsive breakpoints.

YepAPI/skills

Data encryption — TLS everywhere, AES-256-GCM for PII, bcrypt passwords, encrypted backups.

YepAPI/skills

Chart patterns with Recharts/Nivo/D3, responsive containers, color scales, and accessibility.

YepAPI/skills

Drizzle schema definition, push vs migrate, type-safe queries, relations, transactions, and prepared statements.

YepAPI/skills

Upload handling, resize/compress, CDN delivery, blur placeholders, and next/image patterns.

YepAPI/skills

Local business and Google Maps research using YepAPI.

YepAPI/skills

Cursor-based pagination, IntersectionObserver, virtualized lists with @tanstack/react-virtual, and scroll position restoration.

YepAPI/skills

Chat UI components, streaming responses with AI SDK, context window management, and RAG patterns.

相關技能