react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. 57 rules across 8 categories for writing, reviewing, and refactoring React code.
Why use this skill?
Optimize React and Next.js apps with 57 expert rules from Vercel Engineering. Fix waterfalls, reduce bundle size, and improve performance automatically.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/wpank/react-best-practicesWhat This Skill Does
The react-best-practices skill provides a standardized framework for optimizing React and Next.js applications based on Vercel Engineering's rigorous performance standards. It enforces 57 distinct rules organized across eight critical categories, focusing on architectural efficiency and runtime performance. By integrating this skill, your OpenClaw agent gains the capability to automatically audit code, detect performance bottlenecks such as request waterfalls, suggest code-splitting strategies, and provide architectural guidance for Server Components (RSC). It acts as a continuous quality gate for your codebase, ensuring that your application maintains low bundle sizes and optimal Core Web Vitals.
Installation
To integrate the skill into your development environment, run the following command in your terminal:
npx clawhub@latest install react-best-practices
Use Cases
This skill is ideal for developers and teams working on complex Next.js projects. Use it when:
- Conducting code reviews to ensure new features follow performance best practices.
- Refactoring legacy components that cause excessive re-renders or layout shifts.
- Optimizing server-side data fetching to eliminate sequential request waterfalls.
- Analyzing bundle analysis reports to identify bloated dependencies.
- Implementing advanced patterns such as Suspense boundaries for streaming SSR.
- Troubleshooting production performance issues related to hydration or client-side JavaScript execution.
Example Prompts
- "Analyze my current profile page component and suggest optimizations to eliminate the request waterfall between the user data fetch and the user settings fetch using
async-parallelrules." - "Review the current import structure in my layout file and identify which modules should be converted to
next/dynamicimports to improve initial bundle size." - "Refactor this component to minimize re-renders by applying
rerender-rules and implementing proper memoization strategies for the expensive child calculations."
Tips & Limitations
- Prioritize CRITICAL: Always start with the 'Eliminating Waterfalls' and 'Bundle Size Optimization' categories, as they provide the highest impact on perceived load speed.
- Automation Caution: While the skill can suggest code changes, it is best practice to run your own integration tests after applying significant refactors to ensure no side effects are introduced.
- Contextual Awareness: Ensure the agent has full access to the file path or repository structure to provide the most accurate rule suggestions, as some patterns are highly dependent on file location and export structures.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-wpank-react-best-practices": {
"enabled": true,
"auto_update": true
}
}
}Tags
Related Skills
seo-optimizer
SEO optimizer and compliance checker for Chinese social media. Optimizes titles, keyword density, hashtags, and scans for advertising-law banned words (广告法违禁词).
memory-system-optimizer
OpenCLAW 记忆系统优化 - 四层架构 + 自我反思 + 情绪识别 + 任务规划 + 12项增强功能
xcloud-docker-deploy
Deploy any project to xCloud hosting — auto-detects stack (WordPress, Laravel, PHP, Node.js, Next.js, NestJS, Python, Go, Rust), routes to native or Docker deployment, generates production-ready Dockerfile, docker-compose.yml, GitHub Actions CI/CD, and .env.example. Works from zero Docker setup.
memory-compression-system
Integrated memory management and extreme context compression for OpenClaw. Combines memory management, compression, search, and automation in one unified skill.
mac-ai-optimizer
Optimize macOS for AI workloads (OpenClaw, Docker, Ollama). Turn an 8GB Mac into a lean AI server node with near-16GB performance by disabling background services, reducing UI overhead, configuring Docker limits, and enabling SSH remote management.