Frontend performance optimization — Core Web Vitals, bundle analysis, React rendering, image optimization, caching strategies
From claude-toolkitnpx claudepluginhub johwer/marketplace --plugin claude-toolkitThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
| Metric | Good | Needs Improvement | Poor |
|---|---|---|---|
| LCP (Largest Contentful Paint) | < 2.5s | 2.5s – 4.0s | > 4.0s |
| INP (Interaction to Next Paint) | < 200ms | 200ms – 500ms | > 500ms |
| CLS (Cumulative Layout Shift) | < 0.1 | 0.1 – 0.25 | > 0.25 |
CSS
<head>, rest loaded asyncstyle attributes for reusable stylesJavaScript
async or defer on all <script> tags<head>await sequentially when requests are independentImages
width and height to prevent CLSloading="lazy")Network
Bundle Optimization
React.lazy + Suspense)import { Button } from './Button', not from './index')import('chart-library'))npx vite-bundle-visualizerReact Rendering
React.memo for pure componentsuseMemo for expensive computationsuseCallback for callbacks passed as propsreact-window or @tanstack/virtual)Fonts
font-display: swap to prevent invisible text<link rel="preconnect" href="...">Caching
<link rel="preload"><link rel="prefetch">RTK Query Specific
keepUnusedDataFor to control cache lifetimeselectFromResult to minimize re-renders// BAD: Creates new object every render → child re-renders
<Child style={{ color: 'red' }} />
// GOOD: Stable reference
const style = useMemo(() => ({ color: 'red' }), []);
<Child style={style} />
// BAD: Async waterfall — sequential requests
const user = await fetchUser(id);
const posts = await fetchPosts(id); // waits for user!
// GOOD: Parallel requests
const [user, posts] = await Promise.all([
fetchUser(id),
fetchPosts(id)
]);
// BAD: Barrel file imports pull in everything
import { Button } from '@/ui';
// GOOD: Direct import — tree-shakeable
import { Button } from '@/ui/Button';
| Tool | Purpose | Command |
|---|---|---|
| Lighthouse | Full performance audit | Chrome DevTools → Lighthouse tab |
| vite-bundle-visualizer | Bundle composition | npx vite-bundle-visualizer |
| Bundlephobia | Dependency size check | bundlephobia.com |
| WebPageTest | Real-world load testing | webpagetest.org |
| React DevTools Profiler | Component render analysis | React DevTools → Profiler tab |
# Vercel React Best Practices — 45 rules, 21k+ stars
npx skills add vercel-labs/agent-skills
# Addy Osmani Web Quality — Lighthouse audits, Core Web Vitals, 1.2k stars
npx skills add addyosmani/web-quality-skills
# Image optimization + Web performance skills
npx skills add secondsky/claude-skills