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 name | react-best-practices |
| Comes with | The Build Web Apps plugin, by OpenAI |
| Install | codex plugin add build-web-apps@openai-curated, or /plugins in Codex |
| Codex uses it | When it writes, reviews or refactors React components or Next.js pages, data fetching, or bundle size |
| Source | openai/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, moveawaitinto the branch that needs it, stream with Suspense. - Bundle size: import directly instead of from barrel files,
next/dynamicfor 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-visibilityfor long lists, ternaries instead of&&,useTransitionfor loading states. - JavaScript:
SetandMaplookups, 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
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.