review-react-best-practices
Review or refactor React / Next.js code for performance and reliability using a prioritized rule library (waterfalls, bundle size, server/client data fetching, re-renders, rendering). Use when writing React components, Next.js pages (App Router), optimizing bundle size, improving performance, or doing a React/Next.js performance review.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
React Best Practices Review (Performance-First)
Use this skill to turn “React feels slow / Next.js page is heavy / too many requests” into a repeatable, prioritized review.
This skill is intentionally built like a rule library:
-
SKILL.md: how to review + how to search rules -
references/rules/*: one rule per file (taggable, sortable, easy to evolve)
When to apply
Use when:
- Building or refactoring React components
- Working in Next.js (App Router) on RSC boundaries, Server Actions, data fetching
- Reviewing PRs for performance regressions
- Bundle size increases / slow HMR / cold start issues
- UI jank / unnecessary re-renders / hydration issues
Review method (prioritized)
- Start with CRITICAL rules first (waterfalls + bundle).
- Only then go to HIGH (server patterns + serialization).
- Then MEDIUM (re-render + rendering).
- Then LOW-MEDIUM micro-optimizations (JS hot paths).
Section ordering lives in: references/rules/_sections.md
How to use the rules efficiently
Search by keyword
rg -n "waterfall|Promise\\.all|defer await" references/rules
rg -n "barrel|optimizePackageImports|dynamic" references/rules
rg -n "cache\\(|React\\.cache|serialization|RSC" references/rules
rg -n "memo\\(|useMemo|useCallback|dependencies" references/rules
Search by tag
Each rule has tags: in YAML frontmatter.
rg -n "tags:.*bundle" references/rules
rg -n "tags:.*rerender" references/rules
Output format (recommended)
When reviewing code, output:
- Summary (1 paragraph)
- Critical fixes (must-fix, biggest wins)
- High impact (should-fix)
- Medium / Low (nice-to-have)
For each issue include:
- Rule name (and file under
references/rules/) - Location (
path:line) - Why it matters (latency / bundle / CPU / UX)
- Minimal fix direction (prefer small diffs)
If running in a Ship Faster run directory, persist the report to:
-
run_dir/evidence/react-best-practices-review.md
Rule library
Rules live in:
-
references/rules/ - Rule template:
references/rules/_template.md
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-03-11
- 索引更新时间
- 2026-03-11
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!