Skip to content
Codex DesignBETA

React Best Practices skill for Codex.

React Best Practices gives Codex a performance guide for React and Next.js from Vercel Engineering: 64 rules in eight categories, ordered by impact, each with wrong and right code. It ships in OpenAI’s Build Web Apps plugin.

Updated November 12, 2026 · 3 min read

At a glance

Skill namereact-best-practices
Comes withThe Build Web Apps plugin, by OpenAI
Installcodex plugin add build-web-apps@openai-curated, or /plugins in Codex
Codex uses itWhen it writes, reviews or refactors React components or Next.js pages, data fetching, or bundle size
Sourceopenai/plugins on GitHub

What it does

The SKILL.md is a quick index. Each rule has its own file in rules/, with why it matters, an incorrect example, a correct example and references. AGENTS.md holds every rule expanded in one document.

The categories, from highest impact to lowest:

  • Eliminating waterfalls: Promise.all() for independent work, move await into the branch that needs it, stream with Suspense.
  • Bundle size: import directly instead of from barrel files, next/dynamic for heavy components, load analytics after hydration.
  • Server-side: authenticate server actions, React.cache() per request, keep props passed to client components small.
  • Client data fetching: SWR for deduplication, passive scroll listeners, versioned localStorage.
  • Re-renders: derive state during render instead of in effects, functional setState, no components defined inside components.
  • Rendering: content-visibility for long lists, ternaries instead of &&, useTransition for loading states.
  • JavaScript: Set and Map lookups, early returns, toSorted().
  • Advanced patterns: event handlers in refs, init once per app load.

When to use it

Install it if you build with React or Next.js and want Codex to avoid slow patterns while it writes code, or to review an existing app for them. The Build Web Apps testing skill also points Codex here after meaningful React edits.

Try it

Review a Next.js app for performance
Use the react-best-practices skill. Review the app/ directory of this Next.js project for performance problems. Start with waterfalls and bundle size, list each issue with the rule it breaks, then fix the critical ones.

Does it work in Claude Code?

Yes. The skill is plain Markdown rules with no Codex-specific tools, so you can copy the folder from GitHub into ~/.claude/skills and it works the same way.

Keep reading

An independent plugin for Codex. Not affiliated with or endorsed by OpenAI.