vercel-labs 头像

Vercel React Best Practices 技能

支持 Grok Bot

安装量
94.8万
GitHub Star
3.5万
通过安全扫描
3/3
发布方
官方认证
开源协议
MIT
仓库更新
2026年11月20日

TL;DR

vercel-react-best-practices 是由 Vercel 维护的技能,包含 70 条 React 与 Next.js 性能规则,用于指导代码编写、评审与重构。

适合安装

正在审计或重构 React/Next.js 代码、希望引入 Vercel Engineering 生产级性能实践的开发者。

可以跳过

非 React 项目,或只需要通用 React 基础建议而非性能专项规则的团队。

npx skills add https://github.com/vercel-labs/agent-skills --skill vercel-react-best-practices
本页目录
  1. vercel-react-best-practices 核心要点
  2. vercel-react-best-practices 核心数据
  3. Vercel React Best Practices 技能 会输出什么成果?
  4. Vercel React Best Practices 深度解析
  5. vercel-react-best-practices, step by step
  6. Should you install vercel-react-best-practices?
  7. vercel-react-best-practices 包含哪些文件?
  8. 与 vercel-react-best-practices 相关的技能有哪些?
  9. Vercel React Best Practices 技能 有哪些复刻版本?
  10. Vercel React Best Practices 技能常见问题
  11. 同仓库的更多技能

vercel-react-best-practices 核心要点

  • 按性能收益排序的 8 大类别,共 70 条性能规则
  • 全面覆盖请求瀑布流、包体积、服务端/客户端数据获取与重渲染
  • 由 Vercel Engineering 面向 React 与 Next.js 持续维护
  • 每条规则均带前缀并按实测收益分级,便于自动化重构

vercel-react-best-practices 核心数据

累计安装量948,059 (94.8万)skills.sh 注册表
GitHub Star★ 3.5万GitHub
安全审计通过 3 / 3 项扫描器检测skills.sh 审计
仓库最后更新2026年11月20日GitHub
开源协议MITSKILL.md / GitHub
代码仓库vercel-labs/agent-skills ↗

数据截至 2026年12月1日(Skillselion 目录同步)

  • 8 大类别共 70 条性能规则
  • 8 个按性能收益优先级排序的规则类别

vercel-react-best-practices 在 Claude Code 中能做什么?

免费(MIT 协议);文档仅包含规范规则,无需 API Key。

核心能力
React 性能优化 · Next.js 优化 · 包体积优化 · 代码评审 · 代码重构
适用场景
代码重构 · 代码评审 · 前端开发
运行方式
本地运行
定价模式
免费

Vercel React Best Practices 技能 会输出什么成果?

对照 Vercel 分级性能规则完成重构的代码,显著优化请求瀑布流、包体积、渲染效率与数据获取。

  • 按分级性能规则完成重构的 React/Next.js 代码
  • 按类别整理的性能评审清单

Deep dive: how does vercel-react-best-practices actually work?

深度解析 · 最后更新于 2026年8月20日 · 所有引用已于 2026年8月20日 与 vercel-labs/agent-skills 逐条核对 · 撰写说明

vercel-react-best-practices is Vercel Engineering's agent skill that turns their internal React and Next.js performance doctrine into rules your coding agent applies while it writes, reviews, or refactors code. It has 948,059 installs as of December 1, 2026. Unlike the shims we have covered in this series, this one ships the entire method: 70 rule files, a priority order, and a build pipeline that compiles and tests them.

研读方法提交 b8caa26

We read the skill at commit b8caa26 of vercel-labs/agent-skills and verified our catalog copy matches the repository byte for byte, all 76 files.

vercel-react-best-practices, step by step

1. 70 rules, each its own file

70 rules in 8 categories, each rule its own file with a wrong and a right code example.

The SKILL.md is a 149-line index over 70 rule files, and it spells out the fixed anatomy every rule follows:

Each rule file contains: - Brief explanation of why it matters - Incorrect code example with explanation - Correct code example with explanation - Additional context and references

Source: SKILL.md, "How to Use"

The rule for parallel awaits, for instance, opens with its measured stake, "impact: CRITICAL, impactDescription: 2-10× improvement", then shows three sequential awaits against one Promise.all(). An agent that loads the index reads a specific rule only when it needs the detail, which keeps the always-loaded surface small.

2. The priority order is the editorial claim

Waterfalls and bundle size are CRITICAL, memoization is only MEDIUM.

The categories are ranked, and the ranking disagrees with most React folklore:

1Eliminating WaterfallsCRITICALasync-
2Bundle Size OptimizationCRITICALbundle-

Source: SKILL.md, "Rule Categories by Priority"

Re-render optimization, the memo-everything reflex that dominates React performance discourse, sits at priority 5, MEDIUM. Vercel's ordering says the expensive problems are requests that wait on each other and JavaScript you did not need to ship, not components that re-render. For an agent, the order matters mechanically: a code generator working from this file fixes waterfalls before it reaches for React.memo.

3. Every rule is a named, greppable ID

So agent output can cite exactly which rule it applied.

Rules read like a linter's namespace: async-parallel, bundle-barrel-imports, rerender-no-inline-components. From the top CRITICAL tier:

  • async-parallel - Use Promise.all() for independent operations

Source: SKILL.md, "Eliminating Waterfalls"

The IDs give agent output an audit trail: a refactor annotated with server-cache-react is checkable against one specific file, the way a lint suppression names its rule.

4. A security rule hides in the performance skill

Authenticate server actions like API routes.

Priority 3 opens with a rule that is not about speed at all:

  • server-auth-actions - Authenticate server actions like API routes

Source: SKILL.md, "Server-Side Performance"

Server actions are HTTP endpoints an attacker can call directly, and the rule sits in the priority-3 tier every Next.js agent reads, not in a separate security document. Skipping it costs you something worse than milliseconds.

5. The rules are built like software

With a compiler package, extracted tests, and CI in the same repo.

The repo treats the guideline set as a compiled artifact. A sibling package, react-best-practices-build, parses the rule files, validates them, extracts their code examples as test cases, and compiles the 108KB AGENTS.md the skill points to for the fully expanded guide:

For the complete guide with all rules expanded: AGENTS.md

Source: SKILL.md, "Full Compiled Document"

There is a CI workflow (react-best-practices-ci.yml) running against the rules on every change. Documentation with a build step and tests stays true longer than documentation that is only prose; it is the same staleness problem agent-browser solves with runtime serving, answered here with compilation.

Tools it drives: none. This is a pure knowledge skill: no shell commands, no binaries, just rules the agent applies to the code it writes.

Behavior change, before and after:

You askWithout the skillWith the skill
"Add a dashboard page that loads user, posts, and comments"The rules' own "incorrect" example: three sequential awaits, a waterfallPromise.all() from the start, per async-parallel
"Import the Button from our UI package"The "incorrect" example: a barrel import dragging the package into the bundleA direct path import, per bundle-barrel-imports

The fine print worth knowing:

  • The description triggers on "tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements", which in a Next.js repo describes most frontend work, so it spends context even when performance is not your question.
  • It is Vercel's doctrine. The advice is measured and sourced, and it also normalizes Vercel-ecosystem defaults (next/dynamic, after(), RSC serialization) as the way React is written.

Should you install vercel-react-best-practices?

Install it if you ship React or Next.js with an agent doing meaningful amounts of the writing. It is the strongest pure knowledge skill we have read so far: priority-ordered, example-driven, testable, and maintained by the company that profits when your app is fast. Skip it if your stack is not React; the rules assume the ecosystem end to end.

npx skills add https://github.com/vercel-labs/agent-skills --skill vercel-react-best-practices

Previous: how grill-with-docs actually works. All dives: the series index.

快问快答

Do agents read SKILL.md or AGENTS.md?

Both exist on purpose. SKILL.md is the 149-line index agents load by default, reading individual rules on demand; AGENTS.md is the same 70 rules compiled into one 108KB document for tools that ingest everything at once. Same content, two consumption shapes.

Does it slow the agent down by loading 70 rules?

No. The always-loaded SKILL.md is a 149-line index; the agent reads an individual rules/<id>.md only when it needs the worked example, and the compiled AGENTS.md exists for tools that want everything at once.

vercel-react-best-practices 包含哪些文件?

展开查看原始英文技能文件(共 76 个文件)
SKILL.mdMarkdown

正在加载 SKILL.md…

指南

  • Claude Code Skills Examples: 7 Real Skills and What Their SKILL.md Files Actually Do

    Claude Code skills are markdown instruction files that teach the agent one job. This guide walks through 7 real examples spanning discovery, UI generation, plan review, TDD, framework rules, browser automation, and Postgres tuning - led by find-skills at 4,634,500 installs (skills.sh registry, December 2, 2026) - plus the SKILL.md anatomy and a minimal skeleton.

与 vercel-react-best-practices 相关的技能有哪些?

Vercel React Best Practices 技能 有哪些复刻版本?

目录中共收录 23 个 Vercel React Best Practices 副本,累计 2831 次安装。这些副本均已规范化并归属至当前原条目。

Vercel React Best Practices 技能常见问题

Vercel React Best Practices 技能 适合哪些用户?

正在审计或重构 React/Next.js 代码、希望引入 Vercel Engineering 生产级性能实践的开发者。 以下情况建议跳过:非 React 项目,或只需要通用 React 基础建议而非性能专项规则的团队。

什么时候应该使用 vercel-react-best-practices?

编写、评审或重构 React/Next.js 组件、页面、数据获取逻辑或包体积优化时调用。

这个技能一共包含多少条规则?

共包含 70 条规则,划分为 8 个按收益优先级排序的类别。

这些规则覆盖哪些类别?

覆盖消除请求瀑布流、包体积、服务端性能、客户端数据获取、重渲染、渲染优化、JavaScript 性能以及高阶模式。

它由谁来维护?

由 Vercel 官方维护,凝结了 Vercel Engineering 的一线生产实践。

Vercel React Best Practices 安装安全吗?

skills.sh 审计显示已通过 3 项安全扫描中的 3 项。在生产环境安装前,请先查阅本页的安全审计面板。

添加 vercel-react-best-practices 徽章

向开发者展示此技能已收录于 Skillselion,可将以下代码粘贴至 README。

Listed on Skillselion
获取嵌入代码

本周 AI 编程动态

每周一五分钟,精选面向开发者的工具、发布动态与实战技巧。

可随时退订。