frontendexcellence
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "frontendexcellence" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-22b89d1b338b12e24df9957e74f84a0ff7b9b41f8f07b19ea178cf8cdbb0976d. Verify the upstream source and version against https://skillhub.cn/skills/user_3c6cb52e/frontend-excellence-spv6 before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Skill for FrontendExcellence, helping an AI agent efficiently complete tasks related to FrontendExcellence.
Introduction source: third_party · user_3c6cb52e · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Server Components run on the server and send rendered HTML to the client. They can directly access databases, filesystems, and internal APIs without exposing them to the browser.
- Audience
- Not specified in the source documentation.
- Inputs and outputs
- Not specified in the source documentation.
- Software, accounts and paid services
- Not specified in the source documentation.
- Limits and differences
- Not specified in the source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: Frontendexcellence
slug: frontend-excellence
version: 1.0.0
displayName: Frontendexcellence
description: >
FrontendExcellence专用技能,帮助AI Agent高效完成相关任务。
summary: "FrontendExcellence专用技能,帮助AI Agent高效完成相关任务。"
license: MIT
category: 开发者工具
framework:
- Claude Code
- Codex
- Hermes Agent
- OpenClaw
- QClaw
- WorkBuddy
platform: multi-platform
homepage: "https://github.com/1991513ccie-png"
repository: "https://github.com/1991513ccie-png"Frontend Excellence
React Server Components
Server Components run on the server and send rendered HTML to the client. They can directly access databases, filesystems, and internal APIs without exposing them to the browser.
// app/products/page.tsx (Server Component by default)
async function ProductsPage() {
const products = await db.query("SELECT * FROM products WHERE active = true");
return (
<main>
<h1>Products</h1>
<ProductList products={products} />
<AddToCartButton /> {/* Client Component */}
</main>
);
}
Rules:
- Server Components cannot use
useState,useEffect, or browser APIs - Mark interactive components with
'use client'at the top of the file - Pass serializable props from Server to Client Components (no functions, no classes)
- Keep
'use client'boundary as deep in the tree as possible
Streaming SSR
import { Suspense } from 'react';
export default function Dashboard() {
return (
<div>
<Header /> {/* renders immediately */}
<Suspense fallback={<ChartSkeleton />}>
<AnalyticsChart /> {/* streams when ready */}
</Suspense>
<Suspense fallback={<TableSkeleton />}>
<RecentOrders /> {/* streams independently */}
</Suspense>
</div>
);
}
Each Suspense boundary streams independently. Place boundaries around data-fetching components to avoid blocking the entire page.
Code Splitting
import dynamic from 'next/dynamic';
const HeavyEditor = dynamic(() => import('@/components/Editor'), {
loading: () => <EditorSkeleton />,
ssr: false,
});
const AdminPanel = dynamic(() => import('@/components/AdminPanel'));
Split on:
- Route boundaries (automatic in Next.js App Router)
- Conditionally rendered components (modals, drawers, admin panels)
- Heavy libraries (chart libraries, rich text editors, maps)
- Below-the-fold content
Bundle Optimization
// next.config.js
module.exports = {
experimental: {
optimizePackageImports: ['lucide-react', '@heroicons/react', 'lodash-es'],
},
};
Checklist:
- Run
npx next buildand review the output size per route - Use
@next/bundle-analyzerto identify large dependencies - Replace
momentwithdate-fnsordayjs(save ~200KB) - Import specific functions:
import { debounce } from 'lodash-es/debounce' - Prefer CSS over JS for animations (no runtime cost)
- Tree-shake icon libraries:
import { Search } from 'lucide-react'
Core Web Vitals Targets
| Metric | Good | Needs Work | Poor |
|---|---|---|---|
| LCP (Largest Contentful Paint) | <2.5s | 2.5-4.0s | >4.0s |
| INP (Interaction to Next Paint) | <200ms | 200-500ms | >500ms |
| CLS (Cumulative Layout Shift) | <0.1 | 0.1-0.25 | >0.25 |
LCP Optimization
- Preload hero images:
<link rel="preload" as="image" href="..." /> - Use
priorityprop on above-the-fold<Image>components - Inline critical CSS, defer non-critical stylesheets
- Avoid client-side rendering for above-the-fold content
- Set explicit
width/heighton images to prevent layout shifts
Image Optimization
import Image from 'next/image';
<Image
src="/hero.jpg"
alt="Descriptive alt text"
width={1200}
height={630}
priority // preload for LCP images
sizes="(max-width: 768px) 100vw, 50vw"
placeholder="blur"
blurDataURL={base64} // inline tiny placeholder
/>
- Use
next/imageor equivalent (automatic WebP/AVIF, responsive srcset) - Set
sizesattribute to avoid downloading oversized images - Use
placeholder="blur"with a base64 data URL for perceived performance - Lazy load below-the-fold images (default behavior)
Font Loading Strategy
// app/layout.tsx
import { Inter } from 'next/font/google';
const inter = Inter({
subsets: ['latin'],
display: 'swap', // show fallback font immediately
preload: true,
variable: '--font-inter',
});
export default function RootLayout({ children }) {
return (
<html className={inter.variable}>
<body>{children}</body>
</html>
);
}
- Use
next/fontfor zero-CLS font loading with automatic subsetting - Set
display: 'swap'to avoid invisible text during load - Self-host fonts instead of loading from Google CDN (saves DNS lookup)
- Limit to 2 font families maximum
CLS Prevention
- Always set
widthandheighton images and videos - Use
aspect-ratioCSS for responsive media containers - Reserve space for dynamic content (ads, embeds) with
min-height - Avoid inserting content above existing content after load
- Use CSS
contain: layoutfor components that change size
Performance Monitoring
import { onCLS, onINP, onLCP } from 'web-vitals';
onCLS(console.log);
onINP(console.log);
onLCP(console.log);
Measure real user metrics (RUM), not just lab scores. Vercel Analytics and Google Search Console provide field data.
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供前端性能优化的实用指南,涵盖 React Server Components、Streaming SSR 等核心技术
- 包含具体代码示例和最佳实践,解决开发者实际痛点
- 提供 Core Web Vitals 目标值和优化策略,具有明确实用价值
Areas to improve
-
触发词可更具体 Reported severity: Minor
description 中可添加更具体的关键词如 '前端性能'、'React优化' 等以提高触发精准度
Recommendation: 建议在 description 中添加更具体的关键词,如 '前端性能优化'、'React Server Components'、'Core Web Vitals' 等
Highlights
- description 明确说明为 FrontendExcellence 专用技能,与内容一致
Areas to improve
-
文档长度可优化 Reported severity: Minor
单文件内容较长(约500行),可考虑拆分为多个子主题文件
Recommendation: 建议将不同主题(如 React Server Components、Bundle Optimization 等)拆分为独立文件,提高可维护性
Highlights
- 结构清晰,分章节介绍不同主题,包含代码示例和最佳实践
- frontmatter 完整,包含必要的元数据信息
Highlights
- 提供的技术方案均为业界标准实践,代码示例正确
- 覆盖主要异常情况,如 Suspense fallback、错误处理等
- 提供性能监控方案,确保执行可靠性
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 104
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- github.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Not specified in the source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.