nextjs-react-best-practices

nextjs-react-best-practices is a skill for Claude Code from t-code4change/nextjs-claude-skills. It costs 75 tokens per session (1,835 once invoked), scanned A, original, MIT.

A set of guidance for improving the speed and efficiency of React and Next.js applications, based on 70 Vercel Engineering rules. React is a user-interface library, while Next.js is a framework built around it.

In plain words
What is it for?
Use it when reviewing or changing code involving Promise.all, Suspense, useMemo, dynamic imports, shared module imports, or Next.js Server Components.
Why use it?
It helps identify slow data requests, oversized JavaScript downloads, unnecessary screen updates, and inefficient server-rendered components.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it when reviewing or changing code involving Promise.all, Suspense, useMemo, dynamic imports, shared module imports, or Next.js Server Components.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/t-code4change/nextjs-claude-skills/nextjs-react-best-practices
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add t-code4change/nextjs-claude-skills --skill nextjs-react-best-practices
Clone the repo
git clone --depth 1 https://github.com/t-code4change/nextjs-claude-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nextjs-react-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/t-code4change/nextjs-claude-skills/nextjs-react-best-practices/github.svg)](https://agentmods.dev/skills/t-code4change/nextjs-claude-skills/nextjs-react-best-practices)
Your own site
<a href="https://agentmods.dev/skills/t-code4change/nextjs-claude-skills/nextjs-react-best-practices"><img src="https://agentmods.dev/badge/skills/t-code4change/nextjs-claude-skills/nextjs-react-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nextjs-react-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/t-code4change/nextjs-claude-skills/nextjs-react-best-practices"><img src="https://agentmods.dev/badge/skills/t-code4change/nextjs-claude-skills/nextjs-react-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,835 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00075 $0.01835
Opus 5.5 $0.00030 $0.00734
Sonnet 5.5 $0.00015 $0.00367
Haiku 4.5 $0.00007 $0.00184

Measured 2mo ago against content hash 5319bf5de9cf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

nextjs-react-best-practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

nextjs-react-best-practices/SKILL.md · 247 lines

How it starts

The opening of the file, as written. The whole thing — 247 lines — stays where its author put it; the contents beside it link to each section on GitHub.

React & Next.js Performance Best Practices

Source: laguagu/claude-code-nextjs-skills — Vercel Engineering, 70 rules.


Priority Order

Priority Category Impact
1 Eliminating Waterfalls CRITICAL
2 Bundle Size CRITICAL
3 Server-side HIGH
4 Client-side Data MEDIUM-HIGH
5 Re-renders MEDIUM
6 Rendering MEDIUM
7 JavaScript LOW-MEDIUM
8 Advanced LOW

1. Eliminating Waterfalls (CRITICAL)

// ❌ Sequential (300ms)
const user = await getUser(id);
const posts = await getPosts(id);

// ✅ Parallel (100ms)
const [user, posts] = await Promise.all([getUser(id), getPosts(id)]);

// ✅ Start early, await late
const userPromise = getUser(id);
const postsPromise = getPosts(id);
const [user, posts] = await Promise.all([userPromise, postsPromise]);

// ✅ Check cheap sync conditions before awaiting
async function processOrder(orderId: string) {
  if (!orderId || !isValidUUID(orderId)) return null;  // cheap first
  return await fetchOrder(orderId);                    // expensive only if needed
}

// ✅ Suspense for streaming independent content
export default function Dashboard() {
  return (
    <>
      <Header />
      <Suspense fallback={<StatsSkeleton />}><Stats /></Suspense>
      <Suspense fallback={<ActivitySkeleton />}><RecentActivity /></Suspense>
    </>
  );
}

2. Bundle Size (CRITICAL)

// ❌ Barrel import — pulls entire tree
import { Button, Input, Modal } from '@/components';

// ✅ Direct import — tree-shaken
import { Button } from '@/components/ui/button';

// ✅ Dynamic import for heavy components
const Chart = dynamic(() => import('@/components/chart'), {
  loading: () => <Skeleton className="h-64" />,
  ssr: false,
});

// ✅ Defer third-party analytics after hydration
useEffect(() => {
  import('mixpanel-browser').then(({ default: mp }) => mp.init('TOKEN'));
}, []);

// ✅ Preload on hover for perceived performance
const handleMouseEnter = () => {
  router.prefetch(`/products/${slug}`);
};

Read the full file on GitHub · 247 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 247 lines · 75 tokens per session scan A 5319bf5de9cf

Subscribe to this mod's changes

nextjs-react-best-practices is a skill published in the GitHub repository t-code4change/nextjs-claude-skills (2 stars, last pushed 4mo ago), licensed MIT. It adds 75 tokens to every session and 1,835 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

chakra-ui-builder

Build responsive, accessible UI components and layouts using Chakra UI v3, install or configure Chakra UI in new and existing projects, and design scalable themes using tokens, semantic tokens, recipes, and slot recipes. Use this skill whenever a user asks to build, create, or generate any UI component, page, form…

chakra-ui/chakra-ui · 214 tokens

ui-checkstyle

Run the exact ESLint + Prettier + organize-imports sequence that CI's UI Checkstyle workflow runs — on just the files the PR changed — and fail the task if any file ends up with a diff. Invoke after authoring or modifying any .ts, .tsx, .js, .jsx, or .json file under openmetadata-ui/src/main/resources/ui/src/…

open-metadata/OpenMetadata · 122 tokens

tamagui-v6-config

Tamagui v6 theme system: the light/dark/accent/brand/inverse/level/active theme family, the background-active one-off key, and recipe-tree authoring with createV6Config. Use when choosing a theme for a surface, building a selected/emphasis state, or authoring a custom v6 colors pack.

tamagui/tamagui · 0 tokens

tamagui-theme-generator

Generate custom Tamagui themes, color palettes, and preview URLs. Use when creating or refining a color scheme, authoring light/dark palettes with brand accents, or previewing generated themes in the browser.

tamagui/tamagui · 48 tokens

frontend-ui-dark-ts

Build dark-themed React applications using Tailwind CSS with custom theming, glassmorphism effects, and Framer Motion animations. Use when creating dashboards, admin panels, or data-rich interfaces with a refined dark aesthetic.

microsoft/skills · 48 tokens

building-landing-home

Compose a product or documentation home page from the @lobehub/ui/awesome landing components: LandingHero, AgentSkillCard, LogoMarquee, LandingSection, BentoGrid/BentoCard, CodeShowcase, FeatureGrid, InstallBanner and FluidGradient. Covers page structure, the lobedocs homePage hook, router links, theming the accent…

lobehub/lobe-icons · 121 tokens