AgentSkillsCN

nextjs-app-router-patterns

当请求需要掌握 Next.js 14+ 应用路由,结合服务器组件、流式渲染、并行路由以及高级数据获取技术时,应选用此技能。无论是构建 Next.js 应用、实现 SSR/SSG,还是优化 React 服务器组件,此技能都能派上用场。

SKILL.md
--- frontmatter
name: nextjs-app-router-patterns
description: Use when the request requires master Next.js 14+ App Router with Server Components, streaming, parallel routes, and advanced data fetching. Use when building Next.js applications, implementing SSR/SSG, or optimizing React Server Components.

Next.js App Router Patterns

When to use

  • The request explicitly matches nextjs app router patterns outcomes.
  • The user asks for work that aligns with: Use when the request requires master Next.js 14+ App Router with Server Components, streaming, parallel routes, and advanced data fetching. Use when building Next.js applications, implementing SSR/SSG, or optimizing React Server Components.
  • The task needs a repeatable workflow or artifacts defined by this skill.

Do not use when

  • The request is unrelated to this domain or requires a different specialized skill.
  • The user asks only for high-level discussion without applying this workflow.
  • Another skill has a tighter, more specific trigger for the same request.

Example user requests

  • "Apply nextjs app router patterns to improve this feature."
  • "Use nextjs app router patterns and give me the concrete deliverables."
  • "Can you run a full nextjs app router patterns pass on this repo?"
  • "I need step-by-step execution using nextjs app router patterns." Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.

Use this skill when

  • Building new Next.js applications with App Router
  • Migrating from Pages Router to App Router
  • Implementing Server Components and streaming
  • Setting up parallel and intercepting routes
  • Optimizing data fetching and caching
  • Building full-stack features with Server Actions

Do not use this skill when

  • The task is unrelated to next.js app router patterns
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.
  • If detailed examples are required, open resources/implementation-playbook.md.

Resources

  • resources/implementation-playbook.md for detailed patterns and examples.