Optimize React and Next.js performance during coding, review, and refactoring.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "react-performance" skill from askskill: 1. Download https://raw.githubusercontent.com/affaan-m/ECC/main/skills/react-performance/SKILL.md 2. Save it as ~/.claude/skills/react-performance/SKILL.md 3. Reload skills and tell me it's ready
Review this Next.js page for performance issues. Prioritize problems such as request waterfalls, oversized bundles, and inefficient server/client data fetching, then provide optimization recommendations and code examples.
A prioritized list of performance issues with explanations, optimization steps, and sample code.
This React component feels sluggish. Analyze what causes frequent re-renders, then refactor it using performance best practices and explain the benefit and trade-offs of each change.
An analysis of re-render causes, an optimized component version, and explanations for each performance change.
Create a performance optimization checklist for a React/Next.js project. Cover waterfalls, rendering strategy, client fetching, bundle size, JS micro-performance, and advanced optimizations, organized by priority.
A structured performance checklist for code reviews, engineering guidelines, or refactoring plans.
Performance optimization patterns for React 18/19 and Next.js, adapted from Vercel Labs react-best-practices (MIT, v1.0.0). This skill organizes rules by priority and provides decision-tree guidance for active code review and refactoring.
app/, pages/, components/, or data layers| Priority | Category | Prefix | When it matters |
|---|---|---|---|
| 1 — CRITICAL | Eliminating Waterfalls | async- | Anytime await is followed by independent await |
| 2 — CRITICAL | Bundle Size Optimization | bundle- | First-load JS, route-level imports, third-party libs |
| 3 — HIGH | Server-Side Performance | server- | RSC, Server Actions, API routes, SSR |
| 4 — MEDIUM-HIGH | Client-Side Data Fetching | client- | SWR / TanStack Query / raw fetch in hooks |
| 5 — MEDIUM | Re-render Optimization | rerender- | High-frequency state updates, parent-child fan-out |
| 6 — MEDIUM | Rendering Performance | rendering- | Long lists, animations, hydration |
| 7 — LOW-MEDIUM | JavaScript Performance | js- | Hot loops, frequent allocations |
| 8 — LOW | Advanced Patterns | advanced- | Effect-event integration, stable refs |
"Waterfalls are the #1 performance killer" — every sequential
awaitadds full network latency.
Check sync conditions (props, env, hardcoded flags) before awaiting remote data.
// INCORRECT
async function Page({ id }: { id: string }) {
const flag = await getFlag("show-page");
if (!flag || !id) return null;
const data = await getData(id);
// ...
}
// CORRECT — short-circuit on cheap sync condition first
async function Page({ id }: { id: string }) {
if (!id) return null;
const flag = await getFlag("show-page");
if (!flag) return null;
const data = await getData(id);
}
Move await into the branch that uses it.
// INCORRECT — awaits before deciding it needs the data
const user = await getUser(id);
if (mode === "guest") return renderGuest();
return renderUser(user);
// CORRECT
if (mode === "guest") return renderGuest();
const user = await getUser(id);
return renderUser(user);
// INCORRECT — sequential
const user = await getUser(id);
const posts = await getPosts(id);
const followers = await getFollowers(id);
// CORRECT — parallel
const [user, posts, followers] = await Promise.all([
getUser(id),
getPosts(id),
getFollowers(id),
]);
// CORRECT — kick off all promises, await only when each result is needed
const userP = getUser(id);
const postsP = getPosts(id);
const profile = await getProfile(id);
if (profile.private) return null;
const [user, posts] = await Promise.all([userP, postsP]);
Push <Suspense> boundaries close to the data so the page paints what it can while slower sub-trees stream in. The trade-off: layout shift when content arrives — reserve space (skeleton or min-height).
// INCORRECT — sibling awaits run sequentially inside one component
export default async function Page() {
const user = await getUser();
const cart = await getCart();
return <View user={user} cart={cart} />;
}
// CORRECT — split into children, React runs them in parallel
export default async function Page() {
return (
<View>
…
Create reusable Manim animated explainers for technical concepts, graphs, and system flows.
Build robust Python test suites with pytest, TDD, mocking, and coverage.
Learn Rust testing patterns and TDD to improve code quality and reliability.
Troubleshoot BGP sessions, routing policy issues, and collect safe diagnostic evidence.
Run a pre-release verification loop for Quarkus builds, tests, scans, and reviews.
Research prediction market signals for products, dashboards, agents, and decision intelligence.
Learn frontend patterns for React, Next.js, state, performance, and UI best practices.
Write and review React 18/19 components using modern best practices.
Write, fix, and improve tests for React components, hooks, and pages.
Analyze GitHub Next.js or React repos for architecture and performance improvements.
Build React microfrontends with shared dependencies, dynamic forms, and state management.
Apply Nuxt 4 patterns for SSR safety, performance, and data fetching.