
frontend-excellence
Modern frontend patterns for React Server Components, performance optimization, and Core Web Vitals
- Installs
- 204
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/rohitg00/awesome-claude-code-toolkit --skill frontend-excellence- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads frontend-excellence automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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.
FAQ
What does the frontend-excellence skill do?
Modern frontend patterns for React Server Components, performance optimization, and Core Web Vitals
How do I install frontend-excellence?
Run npx skills add https://github.com/rohitg00/awesome-claude-code-toolkit --skill frontend-excellence in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/frontend-excellence/ (personal) or .claude/skills/frontend-excellence/ (project).
Which AI agents can use frontend-excellence?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is frontend-excellence safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains frontend-excellence?
It is published by rohitg00 in rohitg00/awesome-claude-code-toolkit. It has 204 recorded installs.
More from rohitg00/awesome-claude-code-toolkit
devops-automation
rohitg00/awesome-claude-code-toolkit
CI/CD pipeline design with GitHub Actions, Docker, Kubernetes, Helm, and GitOps patterns
accessibility-wcag
rohitg00/awesome-claude-code-toolkit
Web accessibility patterns for WCAG 2.2 compliance including ARIA, keyboard navigation, screen readers, and testing
database-optimization
rohitg00/awesome-claude-code-toolkit
Open the skill to read its SKILL.md instructions.
react-patterns
rohitg00/awesome-claude-code-toolkit
Open the skill to read its SKILL.md instructions.
api-design-patterns
rohitg00/awesome-claude-code-toolkit
REST API design with resource naming, pagination, versioning, and OpenAPI spec generation
websocket-realtime
rohitg00/awesome-claude-code-toolkit
Open the skill to read its SKILL.md instructions.
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.