react-best-practices · Vercel Labs
React 最佳实践 Skill
在编写和审查代码时应用有优先级的 React 与 Next.js 性能建议。
Skill 原始技术说明
技术模板保留英文,便于直接用于兼容的编程 Agent;页面说明、选型建议和检查步骤均已中文本地化。
安装方式
npx skills add vercel-labs/agent-skills --skill react-best-practices
Agent Skills CLI
适合场景
- New React component work
- Next.js data-fetching reviews
- Performance-focused refactors
这个 Skill 能做什么
- Prioritizes high-impact problems such as request waterfalls and excessive client work.
- Provides focused rules for rendering, bundling, data access, and component behavior.
- Helps an agent explain why a performance change matters before editing code.
推荐工作流程
- Identify the rendering path and the highest-impact performance risks.
- Load only the rules relevant to the current component or route.
- Make scoped changes and verify behavior, types, and production output.
使用前需要检查
- Measure before and after when a performance claim affects architecture.
- Do not trade correctness or accessibility for a micro-optimization.
- Confirm recommendations match the React and Next.js versions in the project.