vercel-react-best-practices

vercel-react-best-practices is a skill for Claude Code from smicolon/ai-kit. It costs 53 tokens per session (1,562 once invoked), scanned A, original, MIT.

A collection of performance rules for React and Next.js applications. React builds user interfaces, while Next.js adds server-side features; the rules cover data loading, JavaScript bundle size, server work, caching, and unnecessary re-renders.

In plain words
What is it for?
Use it when writing, reviewing, or refactoring React components, Next.js pages, data fetching, and performance-sensitive frontend code.
Why use it?
It helps find code that makes pages load slowly, sends too much JavaScript, performs repeated work, or waits for requests one after another.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the nextjs plugin — 3 skills shipped together

Good fit Use it when writing, reviewing, or refactoring React components, Next.js pages, data…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/smicolon/ai-kit/vercel-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 smicolon/ai-kit --skill vercel-react-best-practices
Clone the repo
git clone --depth 1 https://github.com/smicolon/ai-kit

Made for: Claude Code.

Or install nextjs, the plugin that ships this one along with the rest of its 3 skills.

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 vercel-react-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/smicolon/ai-kit/vercel-react-best-practices.svg)](https://agentmods.dev/skills/smicolon/ai-kit/vercel-react-best-practices)
Your own site
<a href="https://agentmods.dev/skills/smicolon/ai-kit/vercel-react-best-practices"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/vercel-react-best-practices.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,562 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.00053 $0.01562
Opus 5 $0.00026 $0.00781
Sonnet 5 $0.00011 $0.00312
Haiku 4.5 $0.00005 $0.00156

Measured 2d ago against content hash 5bfea8e44455, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

vercel-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 2d 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.

packs/nextjs/skills/vercel-react-best-practices/SKILL.md · 181 lines

How it starts

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

Vercel React Best Practices

Comprehensive performance optimization guide for React and Next.js applications, maintained by Vercel Engineering. Contains rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.

Rule Categories by Priority

Priority Category Impact Prefix Focus
1 Eliminating Waterfalls CRITICAL async- Parallel fetches, deferred awaits, Suspense streaming
2 Bundle Size Optimization CRITICAL bundle- Direct imports over barrel files, dynamic imports, conditional loading
3 Server-Side Performance HIGH server- React.cache(), non-blocking after(), data minimization
4 Client-Side Data Fetching MEDIUM-HIGH client- SWR / TanStack Query, optimistic UI, caching
5 Re-render Optimization MEDIUM rerender- Reference stability, context splitting, derived state
6 Rendering Performance MEDIUM rendering- Virtualization, content-visibility, memoization
7 JavaScript Performance LOW-MEDIUM js- Algorithmic efficiency, avoiding work in render
8 Advanced Patterns LOW advanced- Islands, partial hydration, micro-optimizations

1. Eliminating Waterfalls (CRITICAL)

async-defer-await

Move await into the exact branches where the value is needed, not at the top of functions:

// ❌ WRONG: Blocks execution even if user branch is never hit
async function handleRequest(userId?: string) {
  const user = userId ? await fetchUser(userId) : null
  if (!user) return redirect('/login')
  return renderProfile(user)
}

// ✅ CORRECT: Start early or await inside condition
async function handleRequest(userId?: string) {
  if (!userId) return redirect('/login')
  const user = await fetchUser(userId)
  return renderProfile(user)
}

async-parallel

Use Promise.all() for independent asynchronous operations:

// ❌ WRONG: Sequential waterfall (takes T1 + T2)
const user = await fetchUser(id)
const posts = await fetchPosts(id)

// ✅ CORRECT: Concurrent fetches (takes max(T1, T2))
const [user, posts] = await Promise.all([
  fetchUser(id),
  fetchPosts(id),
])

Read the full file on GitHub · 181 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. 2d ago First seen · 181 lines · 53 tokens per session scan A 5bfea8e44455

Subscribe to this mod's changes

vercel-react-best-practices is a skill published in the GitHub repository smicolon/ai-kit (6 stars, last pushed 3d ago), licensed MIT. It adds 53 tokens to every session and 1,562 once invoked, about $0.0003 per session on Opus 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-09-04.

Related

Other skills, from other repositories

web-artifacts-builder

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

ThinkInAIXYZ/deepchat · 64 tokens

frontend-code-review

Trigger when the user requests a review of frontend files (e.g., .tsx, .ts, .js). Support both pending-change reviews and focused file reviews while applying the checklist rules.

sangrokjung/claude-forge · 42 tokens

panel-app-react-vite-creator

Create or update an engineering-style NextClaw Panel component with pnpm, Vite, React, TypeScript, and Tailwind CSS, then build it into a static .panel directory inside a schema v2 package or an explicitly loose workspace Panel. Use for modern, reusable, complex, Agent-powered, typed Panel interfaces.

Peiiii/nextclaw · 73 tokens

tailwind-css-patterns

Provides comprehensive Tailwind CSS utility-first styling patterns including responsive design, layout utilities, flexbox, grid, spacing, typography, colors, and modern CSS best practices. Use when styling React/Vue/Svelte components, building responsive layouts, implementing design systems, or optimizing CSS workflow.

figueroaignacio/ignaciofigueroa.dev · 62 tokens

aio-xstate

Implement XState v5 state machines with strict patterns — setup().createMachine(), actors, and TypeScript typing. Use when working with finite state machines (FSM), statecharts, state diagrams, or the actor model in TypeScript. Covers @xstate/react integration (useMachine, useActor, useSelector), parallel states…

aiocean/claude-plugins · 103 tokens

anthropic-frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI).…

davekilleen/Dex · 80 tokens