Communitygithub.com

Next.js 与 React 专家

在涉及现代 Next.js 或 React 架构、数据流、渲染策略、路由或对性能敏感的前端工作时,始终使用此技能。

Next.js 与 React 专家 是什么?

该技能专为使用 Next.js 和 React 的开发者设计,专注于通过识别并解决高影响瓶颈来系统性地提升前端性能。它提供了一套结构化的方法,涵盖数据瀑布、包体积膨胀、不必要的客户端渲染以及组件重渲染等关键性能问题。技能文档中包含一个按优先级排序的行动清单:首先消除数据请求瀑布,然后减少不必要的客户端 JavaScript,接着修复服务端与客户端边界,解决重渲染热点,最后才考虑底层的 JavaScript 微优化。此外,它还提供了一系列审查启发式方法,如优先在服务端执行工作、保持数据请求并行化、以及先减少代码量再优化执行速度。该技能兼容 Claude Code、Cursor、Codex 等 AI 开发助手,并建议在特定场景下与前端设计、Web 设计规范、性能分析及 API 模式等协同技能结合使用。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Anhvu1107/all-agent-skill/tree/HEAD/.agent/skills/nextjs-react-expert

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Next.js 与 React 专家 是做什么的?

选择性阅读规则

从以下开始:

  • references/usage-routing.md
  • references/quality-checklist.md

然后仅加载与用户实际任务相关的继承文档、脚本、资源或示例。

选择性阅读规则

从以下开始:

  • references/senior-master-standard.md

选择与当前瓶颈最匹配的文档:

  • references/performance-investigation-playbook.md 用于结构化调查
  • references/app-router-checklist.md 用于审查 App Router 边界、数据获取和缓存
  • 1-async-eliminating-waterfalls.md 用于解决顺序数据获取和请求链问题
  • 2-bundle-bundle-size-optimization.md 用于处理大型包体积和交互缓慢问题
  • 3-server-server-side-performance.md 用于处理 SSR 和服务器路由性能
  • 4-client-client-side-data-fetching.md 用于处理客户端缓存和请求行为
  • 5-rerender-re-render-optimization.md 用于处理过度重渲染
  • 6-rendering-rendering-performance.md 用于处理渲染瓶颈和大型列表
  • 7-js-javascript-performance.md 用于处理热路径的 JavaScript 问题
  • 8-advanced-advanced-patterns.md 用于高级 React 执行模式
  • 9-cache-components.md 用于处理 Next.js 16 缓存组件和部分预渲染

目的

通过优先修复影响最大的瓶颈来改进 React 和 Next.js 系统。

不要在更大的问题(如数据瀑布、包体积膨胀或不良的组件边界)尚未解决时进行微优化。

何时使用此技能

  • 页面或流程感觉缓慢,且瓶颈尚未定位
  • React 代码重渲染过于频繁
  • 需要审查 Next.js 数据获取或渲染策略
  • 包体积或客户端 JavaScript 量正在损害用户体验
  • 需要审慎地做出现代 Next.js 缓存选择

优先级顺序

  1. 消除数据请求瀑布。
  2. 减少不必要的已交付 JavaScript。
  3. 修复不良的服务端-客户端边界。
  4. 解决重渲染和渲染热点。
  5. 然后才考虑底层的 JavaScript 优化。

审查启发式方法

  • 当客户端不需要拥有数据时,优先在服务端处理。
  • 在依赖允许的情况下,保持数据请求并行。
  • 在尝试让已交付的代码执行得更快之前,先减少交付的代码量。
  • 尽可能在优化前后进行测量。
  • 不要习惯性地添加 memoization;先修复结构问题。

常见关注点

  • 路由级别的数据请求瀑布
  • 过大的客户端组件
  • 不必要的客户端状态
  • 缺失的流式或 Suspense 边界
  • 不良的缓存行为
  • 列表渲染和虚拟化问题

良好结果

一次成功的性能优化应当以以下结果结束:

  • 确定了主要瓶颈
  • 解释了所选优化路径
  • 执行或推荐了相关的检查
  • 代码库变得更简洁,而非更复杂

相关技能

  • frontend-design 当用户体验和实现质量需要协同时
  • web-design-guidelines 用于界面级别的审查
  • performance-profiling 用于更广泛的测量策略
  • api-patterns 当后端形态导致前端数据瀑布时

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches 007: Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Agentfolio: Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Animejs Animation: Advanced JavaScript animation library skill for creating complex, high-performance web animations.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Astropy: Astropy is the core Python package for astronomy, providing essential functionality for astronomical research and data analysis.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Astro: Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Emotional ARC Designer: One sentence - what this skill does and when to invoke it

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Fixing Motion Performance: Audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches I18n Localization: Internationalization and localization patterns.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Interactive Portfolio: Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches JQ: Expert jq usage for JSON querying, filtering, transformation, and pipeline integration.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Landing Page Generator: Generates high-converting Next.js/React landing pages with Tailwind CSS.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches LEX: Centralized ''Truth Engine'' for cross-jurisdictional legal context (US, EU, CA) and contract scaffolding.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Magic Animator: AI-powered animation tool for creating motion in logos, UI, icons, and social media assets.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Makepad Animation: CRITICAL: Use for Makepad animation system.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Nextjs APP Router Patterns: Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.

Anhvu1107/all-agent-skill

ALWAYS use this when the user mentions Nextjs Best Practices, asks to build, debug, review, document, automate, test, configure, migrate, or make decisions in this domain, or the task clearly depends on Nextjs Best Practices; scope: Next.js App Router principles. Apply the bundled workflow, references, scripts, Senior Master standard, and Codex strict review gate before final output.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Nextjs Supabase Auth: Expert integration of Supabase Auth with Next.js App Router

Anhvu1107/all-agent-skill

ALWAYS use this when the task involves reading, extracting, splitting, merging, rotating, creating, validating, OCR-ing, form-filling, or otherwise producing or modifying PDF files.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches React Nextjs Development: React and Next.js 14+ application development with App Router, Server Components, TypeScript, Tailwind CSS, and modern frontend patterns.

Anhvu1107/all-agent-skill

ALWAYS use this when working with Remotion code, video compositions, rendering logic, timing, media assets, or React-based motion workflows.

相关技能